diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 606a16aaedf..f7c551a30b6 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -138,7 +138,7 @@ /src/costmanagement/ @kairu-ms @jsntcy -/src/datafactory/ @qiaozha @fengzhou-msft @qwordy +/src/datafactory/ @kairu-ms @evelyn-ys @Juliehzl /src/blockchain/ @jsntcy diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 88ed55eb08b..7b69763056f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -55,7 +55,7 @@ jobs: git clone -q --single-branch -b dev https://github.com/Azure/azure-cli.git ../azure-cli python -m pip install -U pip - pip install -q azdev==0.1.31 + pip install -q azdev azdev setup -c ../azure-cli -r ./ @@ -140,7 +140,7 @@ jobs: git clone --single-branch -b dev https://github.com/Azure/azure-cli.git ../azure-cli python -m pip install -U pip - pip install azdev==0.1.31 + pip install azdev azdev --version diff --git a/k8s-custom-pipelines.yml b/k8s-custom-pipelines.yml index 76666940070..185af022510 100644 --- a/k8s-custom-pipelines.yml +++ b/k8s-custom-pipelines.yml @@ -95,7 +95,7 @@ stages: - bash : | echo "Downloading the kind script" - curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.9.0/kind-linux-amd64 + curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64 chmod +x ./kind ./kind create cluster displayName: "Create and Start the Kind cluster" diff --git a/linter_exclusions.yml b/linter_exclusions.yml index 8ce15836f65..e47a82d4a74 100644 --- a/linter_exclusions.yml +++ b/linter_exclusions.yml @@ -76,6 +76,9 @@ aks create: workspace_resource_id: rule_exclusions: - option_length_too_long + enable_msi_auth_for_monitoring: + rule_exclusions: + - option_length_too_long enable_encryption_at_host: rule_exclusions: - option_length_too_long @@ -93,6 +96,9 @@ aks enable-addons: workspace_resource_id: rule_exclusions: - option_length_too_long + enable_msi_auth_for_monitoring: + rule_exclusions: + - option_length_too_long aks nodepool add: parameters: enable_node_public_ip: diff --git a/src/aks-preview/az_aks_tool/.gitignore b/src/aks-preview/az_aks_tool/.gitignore deleted file mode 100644 index bee8a64b79a..00000000000 --- a/src/aks-preview/az_aks_tool/.gitignore +++ /dev/null @@ -1 +0,0 @@ -__pycache__ diff --git a/src/aks-preview/az_aks_tool/cli.py b/src/aks-preview/az_aks_tool/cli.py deleted file mode 100644 index ed21d2ce0a2..00000000000 --- a/src/aks-preview/az_aks_tool/cli.py +++ /dev/null @@ -1,42 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import glob -import os -import logging - -import az_aks_tool.const as const -import az_aks_tool.index as index -logger = logging.getLogger(__name__) - - -def get_cli_mod_data(mod_name=const.ACS_MOD_NAME, profile="latest"): - profile_split = profile.split('-') - profile_namespace = '_'.join([profile_split[-1]] + profile_split[:-1]) - - # key value pairs of all modules(in azcli & extention) and its absolute path, used later to find test indexes - path_table = index.get_path_table() - command_modules = path_table["mod"] - inverse_name_table = index.get_name_index(invert=True) - - # construct 'import_name' & mod_data', used later to find test indexes - acs_mod_path = command_modules[mod_name] - mod_data = { - "alt_name": "{}{}".format(const.COMMAND_MODULE_PREFIX, mod_name), - "filepath": os.path.join(acs_mod_path, "tests", profile_namespace), - "base_path": "azure.cli.command_modules.{}.tests.{}".format(mod_name, profile_namespace), - "files": {} - } - - cli_test = index.discover_module_tests(mod_name, mod_data) - return cli_test - - -def get_cli_test_index(module_data=None, mod_name=const.ACS_MOD_NAME, profile="latest"): - if mod_name in module_data: - mod_data = module_data[mod_name] - else: - mod_data = get_cli_mod_data(mod_name=mod_name, profile=profile) - return mod_data["files"] diff --git a/src/aks-preview/az_aks_tool/const.py b/src/aks-preview/az_aks_tool/const.py deleted file mode 100644 index 8285bbb80c3..00000000000 --- a/src/aks-preview/az_aks_tool/const.py +++ /dev/null @@ -1,17 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import sys - -IS_WINDOWS = sys.platform.lower() in ['windows', 'win32'] - -CLI_REPO_NAME = "azure-cli" -EXT_REPO_NAME = 'azure-cli-extensions' -COMMAND_MODULE_PREFIX = 'azure-cli-' -EXTENSION_PREFIX = 'azext_' -ACS_MOD_NAME = "acs" -AKS_PREVIEW_MOD_NAME = EXTENSION_PREFIX + "aks_preview" # azext_aks_preview - -ENV_VAR_TEST_LIVE = 'AZURE_TEST_RUN_LIVE' # denotes that tests should be run live instead of played back diff --git a/src/aks-preview/az_aks_tool/ext.py b/src/aks-preview/az_aks_tool/ext.py deleted file mode 100644 index 8fa39c1e242..00000000000 --- a/src/aks-preview/az_aks_tool/ext.py +++ /dev/null @@ -1,46 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import glob -import os -import logging - -import az_aks_tool.const as const -import az_aks_tool.index as index -logger = logging.getLogger(__name__) - - -def get_ext_mod_data(mod_name=const.AKS_PREVIEW_MOD_NAME, profile="latest"): - profile_split = profile.split('-') - profile_namespace = '_'.join([profile_split[-1]] + profile_split[:-1]) - - # key value pairs of all modules(in azcli & extention) and its absolute path, used later to find test indexes - path_table = index.get_path_table() - extensions = path_table["ext"] - inverse_name_table = index.get_name_index(invert=True) - - # construct 'import_name' & mod_data', used later to find test indexes - aks_preview_mod_path = extensions[mod_name] - glob_pattern = os.path.normcase( - os.path.join("{}*".format(const.EXTENSION_PREFIX))) - file_path = glob.glob(os.path.join(aks_preview_mod_path, glob_pattern))[0] - import_name = os.path.basename(file_path) - mod_data = { - "alt_name": inverse_name_table[mod_name], - "filepath": os.path.join(file_path, "tests", profile_namespace), - "base_path": "{}.tests.{}".format(import_name, profile_namespace), - "files": {} - } - - ext_test = index.discover_module_tests(import_name, mod_data) - return ext_test - - -def get_ext_test_index(module_data=None, mod_name=const.AKS_PREVIEW_MOD_NAME, profile="latest"): - if mod_name in module_data: - mod_data = module_data[mod_name] - else: - mod_data = get_ext_mod_data(mod_name=mod_name, profile=profile) - return mod_data["files"] diff --git a/src/aks-preview/az_aks_tool/filter.py b/src/aks-preview/az_aks_tool/filter.py deleted file mode 100644 index 718a34d4058..00000000000 --- a/src/aks-preview/az_aks_tool/filter.py +++ /dev/null @@ -1,120 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import logging -from collections import Iterable -logger = logging.getLogger(__name__) - - -def extract_file_class_pairs(tag_list): - pairs = [] - for k in tag_list: - tags = k.split(".") - if len(tags) == 2: - pairs.append((tags[0], tags[1])) - return pairs - - -def filter_valid_file_class_pairs(pairs, test_index): - valid_pairs = [] - for pair in pairs: - if pair[0] in test_index and pair[1] in test_index[pair[0]]: - valid_pairs.append(pair) - logger.debug("Valid file & class pair: '{}'".format(pair)) - else: - logger.debug("Invalid file & class pair: '{}'".format(pair)) - return valid_pairs - - -def get_all_values_from_nested_dict(d): - for v in d.values(): - if isinstance(v, dict): - yield from get_all_values_from_nested_dict(v) - else: - yield v - - -def flatten_nested_list(lis): - for item in lis: - if isinstance(item, Iterable) and not isinstance(item, str): - for x in flatten_nested_list(item): - yield x - else: - yield item - - -def filter_valid_test_cases(test_cases, test_index): - valid_test_cases = [] - nested_test_cases = list(get_all_values_from_nested_dict(test_index)) - falttened_test_cases = list(flatten_nested_list(nested_test_cases)) - for test_case in test_cases: - if test_case in falttened_test_cases: - valid_test_cases.append(test_case) - logger.debug("Valid test case: '{}'".format(test_case)) - else: - logger.debug("Invalid test case: '{}'".format(test_case)) - return valid_test_cases - - -def get_test_cases(test_index, matrix, extra_coverage=None): - test_cases = [] - coverage = matrix.get("coverage", {}) - # default coverage - for fileName, className in coverage.items(): - for c in className: - test_cases.extend(test_index[fileName][c]) - # custom extra coverage - if extra_coverage: - # method 1: fileName.className - file_class_pairs = extract_file_class_pairs(extra_coverage) - valid_file_class_pairs = filter_valid_file_class_pairs( - file_class_pairs, test_index) - for valid_pair in valid_file_class_pairs: - test_cases.extend( - test_index[valid_pair[0]][valid_pair[1]]) - # method 2: test cases - test_cases.extend(filter_valid_test_cases( - extra_coverage, test_index)) - return list(set(test_cases)) - - -def get_exclude_test_cases(test_index, matrix, extra_filter=None): - exclude_test_cases = [] - exclude = matrix.get("exclude", {}) - # default exclude - if not extra_filter or "default" in extra_filter: - matrix_test_cases = [] - matrix_file_class_pairs = [] - for k, v in exclude.items(): - # method 1: reason -> test cases - matrix_test_cases.extend(v) - # method 2: fileName -> className - matrix_file_class_pairs.extend((k, x) for x in v) - # method 1: reason -> test cases - exclude_test_cases.extend( - filter_valid_test_cases(matrix_test_cases, test_index)) - # method 2: fileName -> className - valid_matrix_file_class_pairs = filter_valid_file_class_pairs( - matrix_file_class_pairs, test_index) - for valid_matrix_pair in valid_matrix_file_class_pairs: - exclude_test_cases.extend( - test_index[valid_matrix_pair[0]][valid_matrix_pair[1]]) - # custom extra_filter - if extra_filter: - # method 1: matrix exclude key - for k, v in exclude.items(): - if k in extra_filter: - exclude_test_cases.extend(v) - # method 2: fileName.className - file_class_pairs = extract_file_class_pairs(extra_filter) - valid_file_class_pairs = filter_valid_file_class_pairs( - file_class_pairs, test_index) - for valid_pair in valid_file_class_pairs: - exclude_test_cases.extend( - test_index[valid_pair[0]][valid_pair[1]]) - # method 3: test cases - exclude_test_cases.extend( - filter_valid_test_cases(extra_filter, test_index)) - return list(set(exclude_test_cases)) diff --git a/src/aks-preview/az_aks_tool/index.py b/src/aks-preview/az_aks_tool/index.py deleted file mode 100644 index 11d7e405179..00000000000 --- a/src/aks-preview/az_aks_tool/index.py +++ /dev/null @@ -1,290 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import glob -import logging -import os -from importlib import import_module - -import az_aks_tool.utils as utils -import az_aks_tool.const as const -logger = logging.getLogger(__name__) - - -def get_repo_path(repo_name, root_path=None): - # find cache from environment variable - repo_path = os.environ.get("{}_PATH".format(repo_name), "") - if os.path.isdir(repo_path): - logger.info("Find cached '{}' repo path: '{}'".format(repo_name, repo_path)) - return repo_path - - # search from root_path - candidate_root_paths = [os.getcwd(), os.path.expanduser("~")] - valid_repo_paths = [] - repo_path = "" - if root_path is None or not os.path.isdir(root_path): - logger.warning("Invalid root path '{}'!".format(root_path)) - else: - candidate_root_paths = [root_path] + candidate_root_paths - logger.info("Setting root path from '{}'".format(candidate_root_paths)) - for candidate_root_path in candidate_root_paths: - root_path = candidate_root_path - logger.info("Searching from root path: '{}'".format(root_path)) - for path, _, _ in os.walk(root_path): - pattern = os.path.join(path, repo_name) - valid_repo_paths.extend(glob.glob(pattern)) - if len(valid_repo_paths) >= 1: - repo_path = valid_repo_paths[0] - if len(valid_repo_paths) >= 2: - logger.warning("Find {} '{}' repo paths: {}".format(len(valid_repo_paths), repo_name, valid_repo_paths)) - logger.info("Set '{}' repo path as '{}'".format(repo_name, repo_path)) - os.environ["{}_PATH".format(repo_name)] = str(repo_path) - return repo_path - else: - logger.warning("Could not find valid path to repo '{}' from '{}'".format(repo_name, root_path)) - return repo_path - -def find_files(root_paths, file_pattern): - """ Returns the paths to all files that match a given pattern. - - :returns: Paths ([str]) to files matching the given pattern. - """ - if isinstance(root_paths, str): - root_paths = [root_paths] - paths = [] - for root_path in root_paths: - for path, _, _ in os.walk(root_path): - pattern = os.path.join(path, file_pattern) - paths.extend(glob.glob(pattern)) - return paths - -def get_name_index(invert=False, include_whl_extensions=False): - """ Returns a dictionary containing the long and short names of modules and extensions is {SHORT:LONG} format or - {LONG:SHORT} format when invert=True. """ - from azure.cli.core.extension import EXTENSIONS_DIR # pylint: disable=import-error - - table = {} - cli_repo_path = get_repo_path(const.CLI_REPO_NAME) - ext_repo_paths = get_repo_path(const.EXT_REPO_NAME) - - # unified azure-cli package (2.0.68 and later) - paths = os.path.normcase( - os.path.join( - cli_repo_path, 'src', 'azure-cli', 'azure', 'cli', 'command_modules', '*', '__init__.py' - ) - ) - modules_paths = glob.glob(paths) - core_paths = glob.glob(os.path.normcase(os.path.join(cli_repo_path, 'src', '*', 'setup.py'))) - ext_paths = [x for x in find_files(ext_repo_paths, '*.*-info') if 'site-packages' not in x] - whl_ext_paths = [] - if include_whl_extensions: - whl_ext_paths = [x for x in find_files(EXTENSIONS_DIR, '*.*-info') if 'site-packages' not in x] - - def _update_table(paths, key): - folder = None - long_name = None - short_name = None - for path in paths: - folder = os.path.dirname(path) - base_name = os.path.basename(folder) - # determine long-names - if key == 'ext': - short_name = base_name - for item in os.listdir(folder): - if item.startswith(const.EXTENSION_PREFIX): - long_name = item - break - elif base_name.startswith(const.COMMAND_MODULE_PREFIX): - long_name = base_name - short_name = base_name.replace(const.COMMAND_MODULE_PREFIX, '') or '__main__' - else: - short_name = base_name - long_name = '{}{}'.format(const.COMMAND_MODULE_PREFIX, base_name) - if not invert: - table[short_name] = long_name - else: - table[long_name] = short_name - - _update_table(modules_paths, 'mod') - _update_table(core_paths, 'core') - _update_table(ext_paths, 'ext') - _update_table(whl_ext_paths, 'ext') - - return table - -# pylint: disable=too-many-statements -def get_path_table(include_only=None, include_whl_extensions=False): - """ Returns a table containing the long and short names of different modules and extensions and the path to them. - The structure looks like: - { - 'core': { - NAME: PATH, - ... - }, - 'mod': { - NAME: PATH, - ... - }, - 'ext': { - NAME: PATH, - ... - } - } - """ - from azure.cli.core.extension import EXTENSIONS_DIR # pylint: disable=import-error - - # determine whether the call will filter or return all - if isinstance(include_only, str): - include_only = [include_only] - get_all = not include_only - - table = {} - cli_repo_path = get_repo_path(const.CLI_REPO_NAME) - ext_repo_paths = get_repo_path(const.EXT_REPO_NAME) - - paths = os.path.normcase( - os.path.join( - cli_repo_path, 'src', 'azure-cli', 'azure', 'cli', 'command_modules', '*', '__init__.py' - ) - ) - modules_paths = glob.glob(paths) - core_paths = glob.glob(os.path.normcase(os.path.join(cli_repo_path, 'src', '*', 'setup.py'))) - ext_paths = [x for x in find_files(ext_repo_paths, '*.*-info') if 'site-packages' not in x] - whl_ext_paths = [x for x in find_files(EXTENSIONS_DIR, '*.*-info') if 'site-packages' not in x] - - def _update_table(package_paths, key): - if key not in table: - table[key] = {} - - for path in package_paths: - folder = os.path.dirname(path) - base_name = os.path.basename(folder) - - if key == 'ext': - short_name = base_name - long_name = next((item for item in os.listdir(folder) if item.startswith(const.EXTENSION_PREFIX)), None) - else: - short_name = base_name - long_name = '{}{}'.format(const.COMMAND_MODULE_PREFIX, base_name) - - if get_all: - table[key][long_name if key == 'ext' else short_name] = folder - elif not include_only: - return # nothing left to filter - else: - # check and update filter - if short_name in include_only: - include_only.remove(short_name) - table[key][short_name] = folder - if long_name in include_only: - # long name takes precedence to ensure path doesn't appear twice - include_only.remove(long_name) - table[key].pop(short_name, None) - table[key][long_name] = folder - - _update_table(modules_paths, 'mod') - _update_table(core_paths, 'core') - _update_table(ext_paths, 'ext') - if include_whl_extensions: - _update_table(whl_ext_paths, 'ext') - - if include_only: - whl_extensions = [mod for whl_ext_path in whl_ext_paths for mod in include_only if mod in whl_ext_path] - if whl_extensions: - err = 'extension(s): [ {} ] installed from a wheel may need --include-whl-extensions option'.format( - ', '.join(whl_extensions)) - raise Exception(err) - - raise Exception('unrecognized modules: [ {} ]'.format(', '.join(include_only))) - - return table - -def discover_module_tests(mod_name, mod_data): - - # get the list of test files in each module - total_tests = 0 - total_files = 0 - logger.info('Mod: %s', mod_name) - try: - contents = os.listdir(mod_data['filepath']) - test_files = { - x[:-len('.py')]: {} for x in contents if x.startswith('test_') and x.endswith('.py') - } - total_files = len(test_files) - except FileNotFoundError: - logger.info(' No test files found.') - return None - - for file_name in test_files: - mod_data['files'][file_name] = {} - test_file_path = mod_data['base_path'] + '.' + file_name - try: - module = import_module(test_file_path) - except ImportError as ex: - logger.info(' %s', ex) - continue - module_dict = module.__dict__ - possible_test_classes = {x: y for x, y in module_dict.items() if not x.startswith('_')} - for class_name, class_def in possible_test_classes.items(): - try: - class_dict = class_def.__dict__ - except AttributeError: - # skip non-class symbols in files like constants, imported methods, etc. - continue - if class_dict.get('__module__') == test_file_path: - tests = [x for x in class_def.__dict__ if x.startswith('test_')] - if tests: - mod_data['files'][file_name][class_name] = tests - total_tests += len(tests) - logger.info(' %s tests found in %s files.', total_tests, total_files) - return mod_data - - -def build_test_index(module_data): - test_index = {} - conflicted_keys = [] - - def add_to_index(key, path): - key = key or mod_name - if key in test_index: - if key not in conflicted_keys: - conflicted_keys.append(key) - mod1 = utils.extract_module_name(path) - mod2 = utils.extract_module_name(test_index[key]) - if mod1 != mod2: - # resolve conflicted keys by prefixing with the module name and a dot (.) - logger.warning("'%s' exists in both '%s' and '%s'. Resolve using `%s.%s` or `%s.%s`", - key, mod1, mod2, mod1, key, mod2, key) - test_index['{}.{}'.format(mod1, key)] = path - test_index['{}.{}'.format(mod2, key)] = test_index[key] - else: - logger.error("'%s' exists twice in the '%s' module", key, mod1) - else: - test_index[key] = path - - # build the index - for mod_name, mod_data in module_data.items(): - # don't add empty mods to the index - if not mod_data: - continue - - mod_path = mod_data['filepath'] - for file_name, file_data in mod_data['files'].items(): - file_path = os.path.join(mod_path, file_name) + '.py' - for class_name, test_list in file_data.items(): - for test_name in test_list: - test_path = '{}::{}::{}'.format(file_path, class_name, test_name) - add_to_index(test_name, test_path) - class_path = '{}::{}'.format(file_path, class_name) - add_to_index(class_name, class_path) - add_to_index(file_name, file_path) - add_to_index(mod_name, mod_path) - add_to_index(mod_data['alt_name'], mod_path) - - # remove the conflicted keys since they would arbitrarily point to a random implementation - for key in conflicted_keys: - del test_index[key] - - return test_index diff --git a/src/aks-preview/az_aks_tool/log.py b/src/aks-preview/az_aks_tool/log.py deleted file mode 100644 index a5d27925983..00000000000 --- a/src/aks-preview/az_aks_tool/log.py +++ /dev/null @@ -1,40 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import logging -import sys - - -def parse_module_name(levels=1): - module_name = None - module_levels = __name__.split(".") - if len(module_levels) < levels: - print("Failed to parse {}-level module name from '{}'".format(levels, __name__)) - else: - module_name = ".".join(module_levels[:levels]) - return module_name - - -def setup_logging(root_logger_name=None, log_path="az_aks_tool.log"): - if root_logger_name == "" or root_logger_name.isspace(): - root_logger_name = parse_module_name() - logger = logging.getLogger(root_logger_name) - logger.setLevel(level=logging.DEBUG) - - # Formatter - formatter = logging.Formatter( - '%(asctime)s - %(name)s - %(levelname)s - %(message)s') - - # FileHandler - file_handler = logging.FileHandler(filename=log_path, mode="w") - file_handler.setFormatter(formatter) - file_handler.setLevel(level=logging.DEBUG) - logger.addHandler(file_handler) - - # StreamHandler - stream_handler = logging.StreamHandler(sys.stdout) - stream_handler.setFormatter(formatter) - stream_handler.setLevel(level=logging.INFO) - logger.addHandler(stream_handler) diff --git a/src/aks-preview/az_aks_tool/main.py b/src/aks-preview/az_aks_tool/main.py deleted file mode 100644 index 57b8f77bd75..00000000000 --- a/src/aks-preview/az_aks_tool/main.py +++ /dev/null @@ -1,151 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import argparse -import os -import sys -import logging - -import az_aks_tool.const as const -import az_aks_tool.log as log -import az_aks_tool.utils as utils -import az_aks_tool.cli as cli -import az_aks_tool.ext as ext -import az_aks_tool.index as index -import az_aks_tool.run as run - - -def init_argparse(args): - parser = argparse.ArgumentParser() - parser.add_argument("-c", "--cli", action="store_true", default=False, - help="enbale cli test") - parser.add_argument("-e", "--ext", action="store_true", default=False, - help="enbale ext test") - parser.add_argument("-a", "--all", action="store_true", default=False, - help="enbale all tests (cli & ext)") - parser.add_argument("-t", "--tests", nargs='+', help="test case names") - parser.add_argument("-cm", "--cli-matrix", type=str, - help="full path to cli test matrix") - parser.add_argument("-cc", "--cli-coverage", nargs="+", - help="cli test extra coverage") - parser.add_argument("-cf", "--cli-filter", nargs="+", - help="cli test filter") - parser.add_argument("-em", "--ext-matrix", type=str, - help="full path to extension test matrix") - parser.add_argument("-ec", "--ext-coverage", nargs="+", - help="extension test extra coverage") - parser.add_argument("-ef", "--ext-filter", nargs="+", - help="extension test filter") - parser.add_argument("-s", "--series", action="store_true", - default=False, help="series test") - parser.add_argument("-l", "--live", action="store_true", - default=False, help="live test") - parser.add_argument("-ne", "--no-exitfirst", action="store_true", - default=False, help="no exit first") - parser.add_argument("-j", "--parallelism", type=str, - default="8", help="test parallelism") - parser.add_argument("--reruns", type=str, - default="3", help="rerun times") - parser.add_argument("--capture", type=str, - default="sys", help="test capture") - parser.add_argument("-p", "--report-path", type=str, - required=True, help="report path") - parser.add_argument("-f", "--json-report-file", type=str, - default="azcli_aks_runner_report.json", help="json report filename") - parser.add_argument("--xml-file", type=str, - default="azcli_aks_runner.xml", help="junit/xml report filename") - parser.add_argument("--log-file", type=str, - default="az_aks_tool.log", help="log filename") - args = parser.parse_args(args) - return args - - -def main(): - # parse args - print("raw args: {}".format(sys.argv)) - args = init_argparse(sys.argv[1:]) - - # check directory - utils.create_directory(args.report_path) - - # setup logger - root_module_name = log.parse_module_name(levels=1) - log.setup_logging(root_module_name, os.path.join( - args.report_path, args.log_file)) - logger = logging.getLogger("{}.{}".format(root_module_name, __name__)) - - # # check test cases - test_cases = args.tests - ext_matrix_file_path = args.ext_matrix - cli_matrix_file_path = args.cli_matrix - - # prepare pytest args - pytest_args = [] - if not args.series and args.parallelism: - pytest_args.append("-n {}".format(args.parallelism)) - pytest_args.append("--json-report") - pytest_args.append("--reruns {}".format(args.reruns)) - pytest_args.append("--capture {}".format(args.capture)) - pytest_args = [" ".join(pytest_args)] - logger.info("pytest_args: {}".format(pytest_args)) - - # check mode & collect module data - enable_cli = False - enable_ext = False - module_data = {} - if args.cli or args.all: - enable_cli = True - module_data[const.ACS_MOD_NAME] = cli.get_cli_mod_data() - cli_test_index = cli.get_cli_test_index(module_data) - - if args.ext or args.all: - enable_ext = True - module_data[const.AKS_PREVIEW_MOD_NAME] = ext.get_ext_mod_data() - ext_test_index = ext.get_ext_test_index(module_data) - - # build test index - if enable_cli or enable_ext: - logger.info("Building test index...") - test_index = index.build_test_index(module_data) - else: - logger.error( - "Both modes 'cli' and 'ext' are not enabled! No test will be performed!") - logger.error( - "Please provide at least one of the following parameters (-a, -c, -e) to enable the test!") - - # cli matrix test - if enable_cli: - cli_qualified_test_cases = utils.get_fully_qualified_test_cases( - cli_test_index, cli_matrix_file_path, const.ACS_MOD_NAME, args.cli_coverage, args.cli_filter) - logger.info("Perform following cli tests: {}".format( - cli_qualified_test_cases)) - exit_code = run.run_tests(cli_qualified_test_cases, test_index, mode="cli", base_path=args.report_path, xml_file=args.xml_file, json_file=args.json_report_file, in_series=args.series, - run_live=args.live, no_exit_first=args.no_exitfirst, pytest_args=pytest_args) - if exit_code != 0: - sys.exit("CLI test failed with exit code: {}".format(exit_code)) - - # ext matrix test - if enable_ext: - ext_qualified_test_cases = utils.get_fully_qualified_test_cases( - ext_test_index, ext_matrix_file_path, const.AKS_PREVIEW_MOD_NAME, args.ext_coverage, args.ext_filter) - logger.info("Perform following ext tests: {}".format( - ext_qualified_test_cases)) - exit_code = run.run_tests(ext_qualified_test_cases, test_index, mode="ext", base_path=args.report_path, xml_file=args.xml_file, json_file=args.json_report_file, in_series=args.series, - run_live=args.live, no_exit_first=args.no_exitfirst, pytest_args=pytest_args) - if exit_code != 0: - sys.exit("EXT test failed with exit code: {}".format(exit_code)) - - # raw tests - if test_cases: - logger.info("Get {} cases!".format(len(test_cases))) - logger.info("Perform following raw tets: {}".format(test_cases)) - exit_code = run.run_tests(test_cases, test_index, mode="raw", base_path=args.report_path, xml_file=args.xml_file, json_file=args.json_report_file, in_series=args.series, - run_live=args.live, no_exit_first=args.no_exitfirst, pytest_args=pytest_args) - if exit_code != 0: - sys.exit("Raw test failed with exit code: {}".format(exit_code)) - - -if __name__ == "__main__": - main() diff --git a/src/aks-preview/az_aks_tool/run.py b/src/aks-preview/az_aks_tool/run.py deleted file mode 100644 index 13c2f2ae426..00000000000 --- a/src/aks-preview/az_aks_tool/run.py +++ /dev/null @@ -1,199 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import logging -import os -import subprocess -import sys -import traceback -from knack.util import CommandResultItem - -from az_aks_tool.const import IS_WINDOWS, ENV_VAR_TEST_LIVE -from az_aks_tool.utils import heading -logger = logging.getLogger(__name__) - - -class ProfileContext: - def __init__(self, profile_name=None): - self.target_profile = profile_name - - self.origin_profile = current_profile() - - def __enter__(self): - if self.target_profile is None or self.target_profile == self.origin_profile: - logger.info('The tests are set to run against current profile "{}"'.format( - self.origin_profile)) - else: - result = cmd('az cloud update --profile {}'.format(self.target_profile), - 'Switching to target profile "{}"...'.format(self.target_profile)) - if result.exit_code != 0: - raise Exception(result.error.output.decode('utf-8')) - - def __exit__(self, exc_type, exc_val, exc_tb): - if self.target_profile is not None and self.target_profile != self.origin_profile: - logger.info('Switching back to origin profile "{}"...'.format( - self.origin_profile)) - call('az cloud update --profile {}'.format(self.origin_profile)) - - if exc_tb: - traceback.print_exception(exc_type, exc_val, exc_tb) - - -def current_profile(): - return cmd('az cloud show --query profile -otsv', show_stderr=False).result - - -class CommandError(Exception): - - def __init__(self, output, exit_code, command): - message = "Command `{}` failed with exit code {}:\n{}".format( - command, exit_code, output) - self.exit_code = exit_code - self.output = output - self.command = command - super().__init__(message) - - -def call(command, **kwargs): - """ Run an arbitrary command but don't buffer the output. - - :param command: The entire command line to run. - :param kwargs: Any kwargs supported by subprocess.Popen - :returns: (int) process exit code. - """ - return subprocess.call( - command, - shell=True, - **kwargs) - - -def cmd(command, message=False, show_stderr=True, raise_error=False, **kwargs): - """ Run an arbitrary command. - - :param command: The entire command line to run. - :param message: A custom message to display, or True (bool) to use a default. - :param show_stderr: On error, display the contents of STDERR. - :param raise_error: On error, raise CommandError. - :param kwargs: Any kwargs supported by subprocess.Popen - :returns: CommandResultItem object. - """ - - # use default message if custom not provided - if message is True: - message = 'Running: {}\n'.format(command) - - if message: - logger.info(message) - - logger.info("Running: %s", command) - try: - output = subprocess.check_output( - command.split(), - stderr=subprocess.STDOUT if show_stderr else None, - shell=IS_WINDOWS, - **kwargs).decode('utf-8').strip() - logger.debug(output) - return CommandResultItem(output, exit_code=0, error=None) - except subprocess.CalledProcessError as err: - if raise_error: - raise CommandError(err.output.decode(), err.returncode, command) - return CommandResultItem(err.output, exit_code=err.returncode, error=err) - - -def get_test_runner(parallel, log_path, last_failed, no_exit_first, mark): - """Create a pytest execution method""" - def _run(test_paths, pytest_args): - - if os.name == 'posix': - arguments = ['-x', '-v', '--boxed', '-p no:warnings', - '--log-level=WARN', '--junit-xml', log_path] - else: - arguments = ['-x', '-v', '-p no:warnings', - '--log-level=WARN', '--junit-xml', log_path] - - if no_exit_first: - arguments.remove('-x') - - if mark: - arguments.append('-m "{}"'.format(mark)) - - arguments.extend(test_paths) - if parallel: - arguments += ['-n', 'auto'] - if last_failed: - arguments.append('--lf') - if pytest_args: - arguments += pytest_args - cmd = 'python -m pytest {}'.format(' '.join(arguments)) - logger.info('Running: %s', cmd) - return call(cmd) - - return _run - - -def run_tests(tests, test_index, mode, base_path, xml_file, json_file, in_series=False, - run_live=False, profile=None, last_failed=False, no_exit_first=False, mark=None, pytest_args=None): - - heading('Run Tests') - - # process file path - if not xml_file.startswith(mode): - xml_file = "{}_{}".format(mode, xml_file) - if not json_file.startswith(mode): - json_file = "{}_{}".format(mode, json_file) - xml_path = os.path.realpath(os.path.join(base_path, xml_file)) - json_path = os.path.realpath(os.path.join(base_path, json_file)) - pytest_args.append("--json-report-file {}".format(json_path)) - logger.info("junit/xml report file full path: {}".format(xml_path)) - logger.info("json report file full path: {}".format(json_path)) - - # process environment variables - if run_live: - logger.warning('RUNNING TESTS LIVE') - os.environ[ENV_VAR_TEST_LIVE] = 'True' - - def _find_test(index, name): - name_comps = name.split('.') - num_comps = len(name_comps) - key_error = KeyError() - - for i in range(num_comps): - check_name = '.'.join(name_comps[(-1 - i):]) - try: - match = index[check_name] - if check_name != name: - logger.info( - "Test found using just '%s'. The rest of the name was ignored.", check_name) - return match - except KeyError as ex: - key_error = ex - continue - raise key_error - - # lookup test paths from index - test_paths = [] - for t in tests: - try: - test_path = os.path.normpath(_find_test(test_index, t)) - test_paths.append(test_path) - except KeyError: - logger.warning("'%s' not found.", t) - continue - - # Tests have been collected. Now run them. - exit_code = 0 - if not test_paths: - logger.warning('No tests selected to run.') - return exit_code - - with ProfileContext(profile): - runner = get_test_runner(parallel=not in_series, - log_path=xml_path, - last_failed=last_failed, - no_exit_first=no_exit_first, - mark=mark) - exit_code = runner(test_paths=test_paths, pytest_args=pytest_args) - - return 0 if not exit_code else 1 diff --git a/src/aks-preview/az_aks_tool/tests/__init__.py b/src/aks-preview/az_aks_tool/tests/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/aks-preview/az_aks_tool/tests/test_cli.py b/src/aks-preview/az_aks_tool/tests/test_cli.py deleted file mode 100644 index 5b9000b7af6..00000000000 --- a/src/aks-preview/az_aks_tool/tests/test_cli.py +++ /dev/null @@ -1,22 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import os -import unittest - -import az_aks_tool.utils as utils -import az_aks_tool.cli as cli - -THIS_FILE = os.path.abspath(__file__) -THIS_DIR = os.path.dirname(THIS_FILE) -PARENT_DIR = os.path.dirname(THIS_DIR) - -class CliTestCase(unittest.TestCase): - - def test_get_cli_mod_data(self): - pass - - def test_get_cli_test_index(self): - pass diff --git a/src/aks-preview/az_aks_tool/tests/test_ext.py b/src/aks-preview/az_aks_tool/tests/test_ext.py deleted file mode 100644 index ec194f16641..00000000000 --- a/src/aks-preview/az_aks_tool/tests/test_ext.py +++ /dev/null @@ -1,22 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import os -import unittest - -import az_aks_tool.utils as utils -import az_aks_tool.ext as ext - -THIS_FILE = os.path.abspath(__file__) -THIS_DIR = os.path.dirname(THIS_FILE) -PARENT_DIR = os.path.dirname(THIS_DIR) - -class ExtTestCase(unittest.TestCase): - - def test_get_ext_mod_data(self): - pass - - def test_get_ext_test_index(self): - pass diff --git a/src/aks-preview/az_aks_tool/tests/test_filter.py b/src/aks-preview/az_aks_tool/tests/test_filter.py deleted file mode 100644 index d9da9e6a624..00000000000 --- a/src/aks-preview/az_aks_tool/tests/test_filter.py +++ /dev/null @@ -1,121 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import os -import unittest - -import az_aks_tool.utils as utils -import az_aks_tool.filter as custom_filter - -THIS_FILE = os.path.abspath(__file__) -THIS_DIR = os.path.dirname(THIS_FILE) -PARENT_DIR = os.path.dirname(THIS_DIR) - - -class FilterTestCase(unittest.TestCase): - - def test_extract_file_class_pairs(self): - test_cases = ["abc", "a.b", "a.b.c"] - s = custom_filter.extract_file_class_pairs(test_cases) - self.assertEqual(s, [("a", "b")]) - - def test_filter_valid_file_class_pairs(self): - pairs = [("a", "b"), ("c", "d"), ("e", "f")] - test_index = { - "a": { - "b": ["aaa", "bbb"] - }, - "x": { - "y": ["xxx", "yyy"] - } - } - s = custom_filter.filter_valid_file_class_pairs(pairs, test_index) - self.assertEqual(s, [("a", "b")]) - - def test_get_all_values_from_nested_dict(self): - d = { - "a": { - "b": ["aaa", "bbb"] - }, - "x": ["xxx"] - } - s = list(custom_filter.get_all_values_from_nested_dict(d)) - self.assertEqual(s, [["aaa", "bbb"], ["xxx"]]) - - def test_flatten_nested_list(self): - lis = [["aaa", "bbb"], ["xxx"]] - s = list(custom_filter.flatten_nested_list(lis)) - self.assertEqual(s, ["aaa", "bbb", "xxx"]) - - def test_filter_valid_test_cases(self): - test_cases = ["abc", "a.b", "a.b.c", "aaa", "yyy"] - test_index = { - "a": { - "b": ["aaa", "bbb"] - }, - "x": { - "y": ["xxx", "yyy"] - } - } - s = custom_filter.filter_valid_test_cases(test_cases, test_index) - self.assertEqual(s, ["aaa", "yyy"]) - - def test_get_test_cases(self): - test_index = { - "test_validators": { - "TestValidateIPRanges": ["test_simultaneous_allow_and_disallow_with_spaces", "test_simultaneous_enable_and_disable_with_spaces", "test_disable_authorized_ip_ranges", "test_local_ip_address", "test_invalid_ip", "test_IPv6"], - "TestClusterAutoscalerParamsValidators": ["test_empty_key_empty_value", "test_non_empty_key_empty_value", "test_two_empty_keys_empty_value", "test_one_empty_key_in_pair_one_non_empty", "test_invalid_key", "test_valid_parameters"], - "TestSubnetId": ["test_invalid_subnet_id", "test_valid_vnet_subnet_id", "test_none_vnet_subnet_id", "test_empty_vnet_subnet_id"] - } - } - matrix = utils.get_test_matrix( - os.path.join(THIS_DIR, "testdata.json")) - base = test_index["test_validators"] - s1 = sorted(custom_filter.get_test_cases(test_index, matrix, [])) - t1 = sorted((base["TestValidateIPRanges"] + - base["TestClusterAutoscalerParamsValidators"])) - s2 = sorted(custom_filter.get_test_cases(test_index, matrix, [ - "test_valid_vnet_subnet_id", "abc"])) - t2 = sorted((base["TestValidateIPRanges"] + base["TestClusterAutoscalerParamsValidators"] + - ["test_valid_vnet_subnet_id"])) - s3 = sorted(custom_filter.get_test_cases(test_index, matrix, [ - "test_validators.TestSubnetId"])) - t3 = sorted((base["TestValidateIPRanges"] + - base["TestClusterAutoscalerParamsValidators"] + base["TestSubnetId"])) - self.assertEqual(s1, t1) - self.assertEqual(s2, t2) - self.assertEqual(s3, t3) - - def test_get_exclude_test_cases(self): - test_index = { - "test_validators": { - "TestValidateIPRanges": ["test_simultaneous_allow_and_disallow_with_spaces", "test_simultaneous_enable_and_disable_with_spaces", "test_disable_authorized_ip_ranges", "test_local_ip_address", "test_invalid_ip", "test_IPv6"], - "TestClusterAutoscalerParamsValidators": ["test_empty_key_empty_value", "test_non_empty_key_empty_value", "test_two_empty_keys_empty_value", "test_one_empty_key_in_pair_one_non_empty", "test_invalid_key", "test_valid_parameters"], - "TestSubnetId": ["test_invalid_subnet_id", "test_valid_vnet_subnet_id", "test_none_vnet_subnet_id", "test_empty_vnet_subnet_id"] - } - } - matrix = utils.get_test_matrix( - os.path.join(THIS_DIR, "testdata.json")) - base = test_index["test_validators"] - s1 = sorted(custom_filter.get_exclude_test_cases( - test_index, matrix, [])) - t1 = sorted(["test_simultaneous_allow_and_disallow_with_spaces", "test_simultaneous_enable_and_disable_with_spaces", - "test_disable_authorized_ip_ranges"] + base["TestClusterAutoscalerParamsValidators"]) - s2 = sorted(custom_filter.get_exclude_test_cases(test_index, - matrix, ["iprange"])) - t2 = sorted(["test_simultaneous_allow_and_disallow_with_spaces", - "test_simultaneous_enable_and_disable_with_spaces", "test_disable_authorized_ip_ranges"]) - s3 = sorted(custom_filter.get_exclude_test_cases(test_index, - matrix, ["default", "test_invalid_subnet_id"])) - t3 = sorted(["test_simultaneous_allow_and_disallow_with_spaces", "test_simultaneous_enable_and_disable_with_spaces", - "test_disable_authorized_ip_ranges"] + base["TestClusterAutoscalerParamsValidators"] + ["test_invalid_subnet_id"]) - s4 = sorted(custom_filter.get_exclude_test_cases(test_index, matrix, [ - "test_valid_vnet_subnet_id", "abc", "test_validators.TestClusterAutoscalerParamsValidators"])) - t4 = sorted( - (base["TestClusterAutoscalerParamsValidators"] + ["test_valid_vnet_subnet_id"])) - self.assertEqual(s1, t1) - self.assertEqual(s2, t2) - self.assertEqual(s3, t3) - self.assertEqual(s4, t4) diff --git a/src/aks-preview/az_aks_tool/tests/test_index.py b/src/aks-preview/az_aks_tool/tests/test_index.py deleted file mode 100644 index 68b5816db2f..00000000000 --- a/src/aks-preview/az_aks_tool/tests/test_index.py +++ /dev/null @@ -1,34 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import os -import unittest - -import az_aks_tool.utils as utils -import az_aks_tool.index as index - -THIS_FILE = os.path.abspath(__file__) -THIS_DIR = os.path.dirname(THIS_FILE) -PARENT_DIR = os.path.dirname(THIS_DIR) - -class IndexTestCase(unittest.TestCase): - - def test_get_repo_path(self): - pass - - def test_find_files(self): - pass - - def test_get_name_index(self): - pass - - def test_get_path_table(self): - pass - - def test_discover_module_tests(self): - pass - - def build_test_index(self): - pass diff --git a/src/aks-preview/az_aks_tool/tests/test_log.py b/src/aks-preview/az_aks_tool/tests/test_log.py deleted file mode 100644 index 4caafc341ba..00000000000 --- a/src/aks-preview/az_aks_tool/tests/test_log.py +++ /dev/null @@ -1,34 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import logging -import os -import unittest - -import az_aks_tool.log as log - -THIS_FILE = os.path.abspath(__file__) -THIS_DIR = os.path.dirname(THIS_FILE) -PARENT_DIR = os.path.dirname(THIS_DIR) - - -class LogTestCase(unittest.TestCase): - - def test_parse_module_name(self): - root_module_name = log.parse_module_name(levels=1) - error_module_name = log.parse_module_name(levels=5) - self.assertEqual(root_module_name, "az_aks_tool") - self.assertEqual(error_module_name, None) - - def test_setup_logging(self): - log.setup_logging("unittest", "unittest_log.log") - logger = logging.getLogger("unittest.test_setup_logging") - logger.debug("test setup logging") - logger.info("test setup logging") - logger.warning("test setup logging") - f = open("unittest_log.log", "r") - raw_logs = f.readlines() - f.close() - self.assertEqual(len(raw_logs), 3) diff --git a/src/aks-preview/az_aks_tool/tests/test_main.py b/src/aks-preview/az_aks_tool/tests/test_main.py deleted file mode 100644 index 36f4becd0f4..00000000000 --- a/src/aks-preview/az_aks_tool/tests/test_main.py +++ /dev/null @@ -1,21 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import logging -import os -import unittest - -import az_aks_tool.main as main - -THIS_FILE = os.path.abspath(__file__) -THIS_DIR = os.path.dirname(THIS_FILE) -PARENT_DIR = os.path.dirname(THIS_DIR) - - -class MainTestCase(unittest.TestCase): - - def test_init_argparse(self): - args = main.init_argparse(["-p", "./"]) - self.assertEqual(args.report_path, "./") diff --git a/src/aks-preview/az_aks_tool/tests/test_run.py b/src/aks-preview/az_aks_tool/tests/test_run.py deleted file mode 100644 index d69375d491d..00000000000 --- a/src/aks-preview/az_aks_tool/tests/test_run.py +++ /dev/null @@ -1,33 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import os -import unittest - -import az_aks_tool.utils as utils -import az_aks_tool.cli as cli - -THIS_FILE = os.path.abspath(__file__) -THIS_DIR = os.path.dirname(THIS_FILE) -PARENT_DIR = os.path.dirname(THIS_DIR) - -class RunTestCase(unittest.TestCase): - - def test_current_profile(self): - pass - - def test_call(self): - pass - - def test_cmd(self): - pass - - def test_get_test_runner(self): - pass - - def run_tests(self): - pass - - diff --git a/src/aks-preview/az_aks_tool/tests/test_utils.py b/src/aks-preview/az_aks_tool/tests/test_utils.py deleted file mode 100644 index 6bef0b49a0f..00000000000 --- a/src/aks-preview/az_aks_tool/tests/test_utils.py +++ /dev/null @@ -1,54 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import os -import unittest - -import az_aks_tool.utils as utils - -THIS_FILE = os.path.abspath(__file__) -THIS_DIR = os.path.dirname(THIS_FILE) -PARENT_DIR = os.path.dirname(THIS_DIR) - - -class UtilsTestCase(unittest.TestCase): - - def test_check_file_existence(self): - s1 = utils.check_file_existence(None) - s2 = utils.check_file_existence(THIS_DIR) - s3 = utils.check_file_existence(THIS_FILE) - s4 = utils.check_file_existence( - os.path.join(THIS_DIR, "testdata.json")) - self.assertEqual(s1, False) - self.assertEqual(s2, False) - self.assertEqual(s3, True) - self.assertEqual(s4, True) - - def test_get_test_matrix(self): - s = utils.get_test_matrix(os.path.join(THIS_DIR, "testdata.json")) - self.assertEqual(len(s), 2) # number of keys - - def test_get_filted_test_cases(self): - test_cases = ["a", "b", "c", "d"] - s1 = utils.get_filted_test_cases(test_cases, []) - t1 = ["a", "b", "c", "d"] - s2 = utils.get_filted_test_cases(test_cases, ["a", "x"]) - t2 = ["b", "c", "d"] - self.assertEqual(s1, t1) - self.assertEqual(s2, t2) - - def test_add_qualified_prefix(self): - test_cases = ["a", "b", "c"] - s = utils.add_qualified_prefix(test_cases, "p") - self.assertEqual(s, ["p.a", "p.b", "p.c"]) - - def test_get_fully_qualified_test_cases(self): - pass - - def test_heading(self): - pass - - def test_extract_module_name(self): - pass diff --git a/src/aks-preview/az_aks_tool/tests/testdata.json b/src/aks-preview/az_aks_tool/tests/testdata.json deleted file mode 100644 index 221e6291e3e..00000000000 --- a/src/aks-preview/az_aks_tool/tests/testdata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "coverage": { - "test_validators": [ - "TestValidateIPRanges", - "TestClusterAutoscalerParamsValidators" - ] - }, - "exclude": { - "iprange": [ - "test_simultaneous_allow_and_disallow_with_spaces", - "test_simultaneous_enable_and_disable_with_spaces", - "test_disable_authorized_ip_ranges" - ], - "test_validators": [ - "TestClusterAutoscalerParamsValidators" - ] - } -} \ No newline at end of file diff --git a/src/aks-preview/az_aks_tool/utils.py b/src/aks-preview/az_aks_tool/utils.py deleted file mode 100644 index 6607d026a1b..00000000000 --- a/src/aks-preview/az_aks_tool/utils.py +++ /dev/null @@ -1,92 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -import json -import os -import sys -import re -import logging -import pathlib - -import az_aks_tool.filter as custom_filter -logger = logging.getLogger(__name__) - - -def create_directory(dir_path): - if dir_path: - if not os.path.isdir(dir_path): - print("Directory '{}' not exist, creating...".format(dir_path)) - pathlib.Path(dir_path).mkdir(parents=True, exist_ok=True) - else: - print("Invalid dir path: '{}'".format(dir_path)) - - -def check_file_existence(file_path): - if file_path is not None and os.path.isfile(file_path): - return True - return False - - -def get_test_matrix(matrix_file_path): - test_matrix = {} - if check_file_existence(matrix_file_path): - json_file = open(matrix_file_path, 'r') - test_matrix = json.load(json_file) - json_file.close() - else: - logger.warning("Matrix file '{}' not exists!".format(matrix_file_path)) - return test_matrix - - -def get_filted_test_cases(test_cases, exclude_test_cases): - filtered_test_cases = [ - x for x in test_cases if x not in exclude_test_cases] - logger.info("Find {} cases, exclude {} cases, finally get {} cases!".format( - len(test_cases), len(exclude_test_cases), len(filtered_test_cases))) - return filtered_test_cases - - -def add_qualified_prefix(test_cases, prefix): - decorated_test_cases = ["{}.{}".format(prefix, x) for x in test_cases] - return decorated_test_cases - - -def get_fully_qualified_test_cases(test_index, matrix_file_path, mod_name, extra_coverage=None, extra_filter=None): - qualified_test_cases = [] - matrix = get_test_matrix(matrix_file_path) - test_cases = custom_filter.get_test_cases( - test_index, matrix, extra_coverage) - exclude_test_cases = custom_filter.get_exclude_test_cases(test_index, - matrix, extra_filter) - filtered_test_cases = get_filted_test_cases( - test_cases, exclude_test_cases) - # add prefix - qualified_test_cases = add_qualified_prefix( - filtered_test_cases, mod_name) - return qualified_test_cases - - -def heading(txt): - """ Create standard heading to stderr """ - line_len = len(txt) + 4 - print('\n' + '=' * line_len, file=sys.stderr) - print('| {} |'.format(txt), file=sys.stderr) - print('=' * line_len + '\n', file=sys.stderr) - - -def extract_module_name(path): - _CORE_NAME_REGEX = re.compile( - r'azure-cli-(?P[^/\\]+)[/\\]azure[/\\]cli') - _MOD_NAME_REGEX = re.compile( - r'azure-cli[/\\]azure[/\\]cli[/\\]command_modules[/\\](?P[^/\\]+)') - _EXT_NAME_REGEX = re.compile(r'.*(?Pazext_[^/\\]+).*') - - for expression in [_MOD_NAME_REGEX, _CORE_NAME_REGEX, _EXT_NAME_REGEX]: - match = re.search(expression, path) - if not match: - continue - return match.groupdict().get('name') - raise Exception( - 'unexpected error: unable to extract name from path: {}'.format(path)) diff --git a/src/aks-preview/azcli_aks_live_test/.gitignore b/src/aks-preview/azcli_aks_live_test/.gitignore index 819270b0650..444e542f053 100644 --- a/src/aks-preview/azcli_aks_live_test/.gitignore +++ b/src/aks-preview/azcli_aks_live_test/.gitignore @@ -1,5 +1,4 @@ env.list *.json *.xml -!ext_matrix_default.json -!testdata.json +!configs/* diff --git a/src/aks-preview/azcli_aks_live_test/HISTORY.md b/src/aks-preview/azcli_aks_live_test/HISTORY.md new file mode 100644 index 00000000000..2bb7ac8874d --- /dev/null +++ b/src/aks-preview/azcli_aks_live_test/HISTORY.md @@ -0,0 +1,9 @@ +# History + +## 0.1.0 (4/23/2021) + +* Add live test pipeline for aks commands (in aks-preview) + +## 0.2.0 (6/24/2021) + +* Remove the direct (source code) dependency on az-aks-tool, install and use the pre-compiled wheel file instead diff --git a/src/aks-preview/azcli_aks_live_test/HISTORY.rst b/src/aks-preview/azcli_aks_live_test/HISTORY.rst deleted file mode 100644 index 93372ba3c64..00000000000 --- a/src/aks-preview/azcli_aks_live_test/HISTORY.rst +++ /dev/null @@ -1,9 +0,0 @@ -.. :changelog: - -Release History -=============== - -0.1.0 (4/23/2021) -++++++ - -* Add live test pipeline for aks commands diff --git a/src/aks-preview/azcli_aks_live_test/README.md b/src/aks-preview/azcli_aks_live_test/README.md index 206a5eae203..9a372abb586 100644 --- a/src/aks-preview/azcli_aks_live_test/README.md +++ b/src/aks-preview/azcli_aks_live_test/README.md @@ -1,9 +1,13 @@ # Azure CLI AKS Live Test Pipeline & Azure CLI AKS Unit Test Pipeline -These pipelines are used to test newly added aks commands in module aks-preview (azure-cli-extensions) / acs (azure-cli, not covered by default). +These pipelines are used to test newly added aks commands in module aks-preview (azure-cli-extensions) / acs (azure-cli, not covered by default). For more details, you may refer to this [wiki](https://dev.azure.com/msazure/CloudNativeCompute/_wiki/wikis/CloudNativeCompute.wiki/156735/CLI-AKS-Live-Unit-Test-Pipeline). ## How to use -**By default**, these pipelines will be **triggered** when submitting a **PR** to the master branch of the official repo which involves modifying the files under src/aks-preview. Then they will test the aks-preview command group in azure-cli-extensions. For live test pipeline, the test will be performed in record mode first, and then in live mode. Due to some specific [reasons](https://dev.azure.com/msazure/CloudNativeCompute/_wiki/wikis/CloudNativeCompute.wiki/157433/Live-Test-Failures-in-aks-preview-(with-bare-sub)), some test cases would fail. These test cases have been filtered out by file 'ext_matrix_default.json'. For unit test pipeline, the test will be perfomed with 'unittest' and 'pytest' modules. A code coverage report will be generated after the unit tests. You can find test reports and coverage report from pipeline artifacts. +These pipelines (live and unit test pipelines) will be **triggered** when submitting a **PR** to the master branch of the official repo which involves modifying the files under *src/aks-preview*. -You can also trigger this pipeline **manually**. For more details, you may refer to this [wiki](https://dev.azure.com/msazure/CloudNativeCompute/_wiki/wikis/CloudNativeCompute.wiki/156735/Azure-CLI-AKS-Live-Test-Pipeline). +By default, for **live test pipeline**, the test will be performed in **record mode first**, and **then in live mode**. The test mainly uses test cases located in ```src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py```. Due to some specific reasons (more details in another [wiki](https://dev.azure.com/msazure/CloudNativeCompute/_wiki/wikis/CloudNativeCompute.wiki/157433/Live-Test-Failures-in-aks-preview-(with-bare-sub))), some test cases would fail. These test cases have been filtered out by file 'ext_matrix_default.json' (more details in [section Filter](#Filter)). For **unit test pipeline**, the test will be perfomed with 'unittest' and 'pytest' modules. A code coverage report will be generated after the unit tests. For both of the test pipelines, you can find test reports and coverage report from pipeline artifacts. + +If the newly added commands and test cases use the **features** that are being previewed, that is, some feature under container service needs to be manually registered before using the command, then such cases will not be able to execute/pass the test temporarily, since the subscription used for testing does not (and does not intend to) enable these additional features. In the future, we will use customer header to pass these features in test cases, but for now you can just bypass these cases. For now, you can follow the instructions in [section Bypass Test Case](#bypass-test-case) to **bypass such test cases**. + +You can also trigger this pipeline **manually** and adjust variables such as test coverage, test filter, test location, etc. as needed. For more details, you may refer to the following sections. \ No newline at end of file diff --git a/src/aks-preview/azcli_aks_live_test/configs/cli_matrix_default.json b/src/aks-preview/azcli_aks_live_test/configs/cli_matrix_default.json new file mode 100644 index 00000000000..33c36b35b85 --- /dev/null +++ b/src/aks-preview/azcli_aks_live_test/configs/cli_matrix_default.json @@ -0,0 +1,12 @@ +{ + "coverage": { + "test_aks_commands": [ + "AzureKubernetesServiceScenarioTest" + ] + }, + "exclude": { + "need additional feature": [ + "test_managed_aad_enable_azure_rbac" + ] + } +} \ No newline at end of file diff --git a/src/aks-preview/azcli_aks_live_test/ext_matrix_default.json b/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json similarity index 84% rename from src/aks-preview/azcli_aks_live_test/ext_matrix_default.json rename to src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json index dffce3ffd09..d60baa9e4b6 100644 --- a/src/aks-preview/azcli_aks_live_test/ext_matrix_default.json +++ b/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json @@ -26,7 +26,11 @@ "test_aks_create_with_pod_identity_enabled", "test_aks_create_using_azurecni_with_pod_identity_enabled", "test_aks_pod_identity_usage", - "test_aks_create_with_fips" + "test_aks_create_with_fips", + "test_aks_create_with_monitoring_aad_auth_msi", + "test_aks_create_with_monitoring_aad_auth_uai", + "test_aks_enable_monitoring_with_aad_auth_msi", + "test_aks_enable_monitoring_with_aad_auth_uai" ], "unknown": [ "test_aks_create_and_update_with_managed_aad_enable_azure_rbac", diff --git a/src/aks-preview/azcli_aks_live_test/clean_up.sh b/src/aks-preview/azcli_aks_live_test/scripts/clean_up.sh similarity index 71% rename from src/aks-preview/azcli_aks_live_test/clean_up.sh rename to src/aks-preview/azcli_aks_live_test/scripts/clean_up.sh index 4bbeb2f3520..38ff104e8d5 100755 --- a/src/aks-preview/azcli_aks_live_test/clean_up.sh +++ b/src/aks-preview/azcli_aks_live_test/scripts/clean_up.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash # login -az login --service-principal -u $AZCLI_ALT_CLIENT_ID -p $AZCLI_ALT_CLIENT_SECRET -t $TENANT_ID -az account set -s $AZCLI_ALT_SUBSCRIPTION_ID +az login --service-principal -u "${AZCLI_ALT_CLIENT_ID}" -p "${AZCLI_ALT_CLIENT_SECRET}" -t "${TENANT_ID}" +az account set -s "${AZCLI_ALT_SUBSCRIPTION_ID}" az account show # list the details of resource groups whose names start with "clitest" diff --git a/src/aks-preview/azcli_aks_live_test/clone_repo.sh b/src/aks-preview/azcli_aks_live_test/scripts/clone_repo.sh similarity index 59% rename from src/aks-preview/azcli_aks_live_test/clone_repo.sh rename to src/aks-preview/azcli_aks_live_test/scripts/clone_repo.sh index 8eca3be875b..af131c4a9f0 100755 --- a/src/aks-preview/azcli_aks_live_test/clone_repo.sh +++ b/src/aks-preview/azcli_aks_live_test/scripts/clone_repo.sh @@ -11,30 +11,26 @@ set -o xtrace [[ -z "${CLI_BRANCH}" ]] && (echo "CLI_BRANCH is empty"; exit 1) [[ -z "${EXT_REPO}" ]] && (echo "EXT_REPO is empty"; exit 1) [[ -z "${EXT_BRANCH}" ]] && (echo "EXT_BRANCH is empty"; exit 1) -[[ -z "${MANUAL_EXT}" ]] && (echo "MANUAL_EXT is empty"; exit 1) - -# dir -pwd -ls -alh +[[ -z "${BUILD_REASON}" ]] && (echo "BUILD_REASON is empty"; exit 1) +[[ -z "${LIVE_TEST_BASE_DIR}" ]] && (echo "LIVE_TEST_BASE_DIR is empty"; exit 1) # clone azure-cli (default is the official repo) -# git clone https://github.com/Azure/azure-cli.git -git clone ${CLI_REPO} +git clone "${CLI_REPO}" # ckeckout to a specific azure-cli branch (default is the dev branch) pushd azure-cli/ git branch -a -git checkout ${CLI_BRANCH} +git checkout "${CLI_BRANCH}" popd -# clone azure-cli-extensions when manually specify the extension repo -if [[ ${MANUAL_EXT} == true ]]; then - echo "Manually specify the extension repo, delete the current 'azure-cli-extensions' directory!" +# clone azure-cli-extensions when manually trigger the pipeline +if [[ ${BUILD_REASON} == "Manual" ]]; then + echo "Manually trigger the pipeline, delete the current 'azure-cli-extensions' directory!" rm -rf azure-cli-extensions/ - git clone ${EXT_REPO} + git clone "${EXT_REPO}" pushd azure-cli-extensions/ git branch -a - git checkout ${EXT_BRANCH} + git checkout "${EXT_BRANCH}" popd fi @@ -45,6 +41,5 @@ git log -10 popd # copy live test related files to the same level as the checkout directory ($(Agent.BuildDirectory)/s) -cp -rT azure-cli-extensions/src/aks-preview/azcli_aks_live_test/ ./ -cp -r azure-cli-extensions/src/aks-preview/az_aks_tool/ ./ +cp -rT "${LIVE_TEST_BASE_DIR}" ./ ls -alh diff --git a/src/aks-preview/azcli_aks_live_test/prepare_image.sh b/src/aks-preview/azcli_aks_live_test/scripts/prepare_image.sh similarity index 72% rename from src/aks-preview/azcli_aks_live_test/prepare_image.sh rename to src/aks-preview/azcli_aks_live_test/scripts/prepare_image.sh index 1f603ea5759..9f84224663f 100755 --- a/src/aks-preview/azcli_aks_live_test/prepare_image.sh +++ b/src/aks-preview/azcli_aks_live_test/scripts/prepare_image.sh @@ -11,11 +11,7 @@ set -o xtrace [[ -z "${IMAGE_NAME}" ]] && (echo "IMAGE_NAME is empty"; exit 1) [[ -z "${IMAGE_TAG}" ]] && (echo "IMAGE_TAG is empty"; exit 1) -# dir -pwd -ls -alh - # prepare docker image echo "Pulling test image from '${IMAGE_PREFIX}/${IMAGE_NAME}:${IMAGE_TAG}'..." -docker pull ${IMAGE_PREFIX}/${IMAGE_NAME}:${IMAGE_TAG} -docker tag ${IMAGE_PREFIX}/${IMAGE_NAME}:${IMAGE_TAG} ${IMAGE_NAME}:${IMAGE_TAG} +docker pull "${IMAGE_PREFIX}"/"${IMAGE_NAME}":"${IMAGE_TAG}" +docker tag "${IMAGE_PREFIX}"/"${IMAGE_NAME}":"${IMAGE_TAG}" "${IMAGE_NAME}":"${IMAGE_TAG}" diff --git a/src/aks-preview/azcli_aks_live_test/scripts/setup_venv.sh b/src/aks-preview/azcli_aks_live_test/scripts/setup_venv.sh new file mode 100755 index 00000000000..0a48cdc951c --- /dev/null +++ b/src/aks-preview/azcli_aks_live_test/scripts/setup_venv.sh @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +# check var +# specify the version of python3, e.g. 3.6 +[[ -z "${PYTHON_VERSION}" ]] && (echo "PYTHON_VERSION is empty"; exit 1) + +patchImageTools(){ + apt install -y curl +} + +setupVenv(){ + # delete existing venv + deactivate || true + rm -rf azEnv || true + + # create new venv + python"${PYTHON_VERSION}" -m venv azEnv + source azEnv/bin/activate + python -m pip install -U pip +} + +# need to be executed in a venv +installBuildTools(){ + pip install tox coverage + pip install -U build +} + +# need to be executed in a venv +setupAZ(){ + cli_repo=${1:-"."} + ext_repo=${2:-""} + + # install azdev, used later to install azcli and extension + pip install azdev==0.1.32 + + # pre-install-az: check existing az + which az || az version || az extension list || true + + # install-az: from cloned repos with azdev + if [[ -z ${ext_repo} ]]; then + azdev setup -c "${cli_repo}" + else + azdev setup -c "${cli_repo}" -r "${ext_repo}" + fi + + # post-install-az: check installation result + which az && az version +} + +# need to be executed in a venv +installTestPackages(){ + # install pytest plugins + pip install pytest-json-report pytest-rerunfailures --upgrade + + # install coverage for measuring code coverage + pip install coverage +} + +# need to be executed in a venv +installAZAKSTOOLFromLocal(){ + wheel_file=${1} + pip install "${wheel_file}" + pip show az-aks-tool +} + +# need to be executed in a venv +installAZAKSTOOL(){ + wheel_file="az_aks_tool-latest-py3-none-any.whl" + wheel_url="https://akspreview.blob.core.windows.net/azakstool/${wheel_file}" + curl -sLO ${wheel_url} + installAZAKSTOOLFromLocal ${wheel_file} +} + +# need to be executed in a venv with kusto related modules installed +removeKustoPTHFile(){ + pushd azEnv/lib/python"${PYTHON_VERSION}"/site-packages + rm azure_kusto_data*nspkg.pth + rm azure_kusto_ingest*nspkg.pth + popd +} + +# need to be executed in a venv after 'setupAZ' +igniteAKSPreview(){ + # use a fake command to force trigger the command index update of azure-cli, in order to load aks-preview commands + # otherwise, cold boot execution of azdev test / pytest would only use commands in the acs module + az aks fake-command --debug || true +} + +# need to be executed in a venv +removeAKSPreview(){ + # remove extension + echo "Remove existing aks-preview extension (if any)" + if az extension remove --name aks-preview || azdev extension remove aks-preview; then + deactivate + source azEnv/bin/activate + fi +} + +# need to be executed in a venv after 'setupAZ' +setupAKSPreview(){ + # remove extension + removeAKSPreview + + # install latest extension + echo "Install the latest aks-preview extension and re-activate the virtualenv" + azdev extension add aks-preview + az extension list + azdev extension list | grep "aks-preview" -C 5 + deactivate + source azEnv/bin/activate +} + +setup_option=${1:-""} +if [[ -n ${setup_option} ]]; then + # bash options + set -o errexit + set -o nounset + set -o pipefail + set -o xtrace + + # install missing tools in the image + patchImageTools + + # create new venv if second arg is not "n" + new_venv=${2:-"n"} + if [[ ${new_venv} == "y" ]]; then + echo "Create new venv!" + setupVenv + else + source azEnv/bin/activate + fi + + if [[ ${setup_option} == "build" ]]; then + echo "Start to build az-aks-tool!" + installBuildTools + elif [[ ${setup_option} == "setup-tool" ]]; then + echo "Start to setup az-aks-tool!" + local_setup=${3:-"n"} + if [[ ${local_setup} == "y" ]]; then + wheel_file=${4} + installAZAKSTOOLFromLocal "${wheel_file}" + else + installAZAKSTOOL + fi + removeKustoPTHFile + elif [[ ${setup_option} == "setup-az" ]]; then + echo "Start to setup azure-cli!" + cli_repo=${3:-"azure-cli/"} + ext_repo=${4:-""} + setupAZ "${cli_repo}" "${ext_repo}" + installTestPackages + elif [[ ${setup_option} == "setup-akspreview" ]]; then + echo "Start to setup aks-preview!" + setupAKSPreview + igniteAKSPreview + else + echo "Unsupported setup option '${setup_option}'!" + fi + echo "All Done!" +fi diff --git a/src/aks-preview/azcli_aks_live_test/start_container.sh b/src/aks-preview/azcli_aks_live_test/scripts/start_container.sh similarity index 71% rename from src/aks-preview/azcli_aks_live_test/start_container.sh rename to src/aks-preview/azcli_aks_live_test/scripts/start_container.sh index 0edadb91c9d..0d64e564add 100755 --- a/src/aks-preview/azcli_aks_live_test/start_container.sh +++ b/src/aks-preview/azcli_aks_live_test/scripts/start_container.sh @@ -10,7 +10,6 @@ set -o xtrace # take the first arg as container name container_name=${1:-"azcli-aks-live-test-container"} [[ -z "${MAPPED_AZCLI_ALT_CLIENT_SECRET}" ]] && (echo "MAPPED_AZCLI_ALT_CLIENT_SECRET is empty"; exit 1) -[[ -z "${MAPPED_AZCLI_ALT_CLIENT_SECRET}" ]] && (echo "MAPPED_AZCLI_ALT_CLIENT_SECRET is empty"; exit 1) [[ -z "${IMAGE_NAME}" ]] && (echo "IMAGE_NAME is empty"; exit 1) [[ -z "${IMAGE_TAG}" ]] && (echo "IMAGE_TAG is empty"; exit 1) @@ -19,18 +18,18 @@ pwd ls -alh # transcribe environment variables into file 'env.list' -./transcribe_env.sh +./scripts/transcribe_env.sh # start container in backgroud with tty # mount current directory ($(Agent.BuildDirectory)/s) to /opt in container # set working directory as /opt in container # pass secrects as environment variables directly (instead of storing in env.list) # pass other environment variables with env.list -docker run -t -d -v $PWD:/opt -w /opt \ --e AZCLI_ALT_CLIENT_SECRET=${MAPPED_AZCLI_ALT_CLIENT_SECRET} \ --e AZURE_CLI_TEST_DEV_SP_PASSWORD=${MAPPED_AZCLI_ALT_CLIENT_SECRET} \ +docker run -t -d -v "$PWD":/opt -w /opt \ +-e AZCLI_ALT_CLIENT_SECRET="${MAPPED_AZCLI_ALT_CLIENT_SECRET}" \ +-e AZURE_CLI_TEST_DEV_SP_PASSWORD="${MAPPED_AZCLI_ALT_CLIENT_SECRET}" \ --env-file ./env.list \ ---name ${container_name} ${IMAGE_NAME}:${IMAGE_TAG} +--name "${container_name}" "${IMAGE_NAME}":"${IMAGE_TAG}" # remove env.list rm ./env.list diff --git a/src/aks-preview/azcli_aks_live_test/scripts/test_cli_live.sh b/src/aks-preview/azcli_aks_live_test/scripts/test_cli_live.sh new file mode 100755 index 00000000000..466e981f873 --- /dev/null +++ b/src/aks-preview/azcli_aks_live_test/scripts/test_cli_live.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash + +# bash options +set -o errexit +set -o nounset +set -o pipefail +set -o xtrace + +# check var +[[ -z "${TENANT_ID}" ]] && (echo "TENANT_ID is empty"; exit 1) +[[ -z "${AZCLI_ALT_SUBSCRIPTION_ID}" ]] && (echo "AZCLI_ALT_SUBSCRIPTION_ID is empty"; exit 1) +[[ -z "${AZCLI_ALT_CLIENT_ID}" ]] && (echo "AZCLI_ALT_CLIENT_ID is empty"; exit 1) +[[ -z "${AZCLI_ALT_CLIENT_SECRET}" ]] && (echo "AZCLI_ALT_CLIENT_SECRET is empty"; exit 1) +[[ -z "${TEST_MODE}" ]] && (echo "TEST_MODE is empty"; exit 1) +[[ -z "${PARALLELISM}" ]] && (echo "PARALLELISM is empty"; exit 1) +[[ -z "${CLI_TEST_MATRIX}" ]] && (echo "CLI_TEST_MATRIX is empty") +[[ -z "${CLI_TEST_FILTER}" ]] && (echo "CLI_TEST_FILTER is empty") +[[ -z "${CLI_TEST_COVERAGE}" ]] && (echo "CLI_TEST_COVERAGE is empty") + +# activate virtualenv +source azEnv/bin/activate + +# remove aks-preview +source ./scripts/setup_venv.sh +removeAKSPreview + +# prepare run flags +run_flags="-c --no-exitfirst --report-path ./reports --reruns 3 --capture=sys" +# parallel +if [[ ${PARALLELISM} -ge 2 ]]; then + run_flags+=" -j ${PARALLELISM}" +else + run_flags+=" -s" +fi +# cli matrix +if [[ -n ${CLI_TEST_MATRIX} ]]; then + run_flags+=" -cm ./configs/${CLI_TEST_MATRIX}" +fi +# cli extra filter +if [[ -n ${CLI_TEST_FILTER} ]]; then + run_flags+=" -cf ${CLI_TEST_FILTER}" +fi +# cli extra coverage +if [[ -n ${CLI_TEST_COVERAGE} ]]; then + run_flags+=" -cc ${CLI_TEST_COVERAGE}" +fi + +# recording test +if [[ ${TEST_MODE} == "record" || ${TEST_MODE} == "all" ]]; then + echo "Test in record mode!" + run_flags+=" --json-report-file=cli_report.json" + run_flags+=" --xml-file=cli_result.xml" + echo "run flags: ${run_flags}" + azaks ${run_flags} +fi + +# live test +if [[ ${TEST_MODE} == "live" || ${TEST_MODE} == "all" ]]; then + echo "Test in live mode!" + az login --service-principal -u "${AZCLI_ALT_CLIENT_ID}" -p "${AZCLI_ALT_CLIENT_SECRET}" -t "${TENANT_ID}" + az account set -s "${AZCLI_ALT_SUBSCRIPTION_ID}" + az account show + run_flags+=" -l --json-report-file=cli_live_report.json" + run_flags+=" --xml-file=cli_live_result.xml" + echo "run flags: ${run_flags}" + azaks ${run_flags} +fi diff --git a/src/aks-preview/azcli_aks_live_test/scripts/test_cli_unit.sh b/src/aks-preview/azcli_aks_live_test/scripts/test_cli_unit.sh new file mode 100755 index 00000000000..b32a46be1c3 --- /dev/null +++ b/src/aks-preview/azcli_aks_live_test/scripts/test_cli_unit.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +# bash options +set -o errexit +set -o nounset +set -o pipefail +set -o xtrace + +# const +acs_base_dir="azure-cli/src/azure-cli/azure/cli/command_modules/acs" + +# activate virtualenv +source azEnv/bin/activate + +# remove aks-preview +source ./scripts/setup_venv.sh +removeAKSPreview + +# unit test & coverage report +acs_unit_test_failed="" +pushd ${acs_base_dir} +# clean existing coverage report +(coverage combine || true) && (coverage erase || true) +# perform unit test with module 'unittest' +# since recording test (performed in test_cli_live.sh) is based on module 'pytest', so skip here +# coverage run --source=. --omit=*/tests/* -p -m pytest +if ! coverage run --source=. --omit=*/tests/* -p -m unittest discover; then + acs_unit_test_failed="true" +fi +# generate & copy coverage report +coverage combine +coverage report -m +coverage json -o coverage_acs.json +popd +mkdir -p reports/ && cp ${acs_base_dir}/coverage_acs.json reports/ + +if [[ ${acs_unit_test_failed} == "true" ]]; then + echo "Unit test failed!" + exit 1 +fi diff --git a/src/aks-preview/azcli_aks_live_test/test_ext_live.sh b/src/aks-preview/azcli_aks_live_test/scripts/test_ext_live.sh similarity index 56% rename from src/aks-preview/azcli_aks_live_test/test_ext_live.sh rename to src/aks-preview/azcli_aks_live_test/scripts/test_ext_live.sh index 0f7129a3363..ebf07068e65 100755 --- a/src/aks-preview/azcli_aks_live_test/test_ext_live.sh +++ b/src/aks-preview/azcli_aks_live_test/scripts/test_ext_live.sh @@ -13,52 +13,27 @@ set -o xtrace [[ -z "${AZCLI_ALT_CLIENT_SECRET}" ]] && (echo "AZCLI_ALT_CLIENT_SECRET is empty"; exit 1) [[ -z "${TEST_MODE}" ]] && (echo "TEST_MODE is empty"; exit 1) [[ -z "${PARALLELISM}" ]] && (echo "PARALLELISM is empty"; exit 1) -[[ -z "${TEST_CASES}" ]] && (echo "TEST_CASES is empty") [[ -z "${EXT_TEST_MATRIX}" ]] && (echo "EXT_TEST_MATRIX is empty") [[ -z "${EXT_TEST_FILTER}" ]] && (echo "EXT_TEST_FILTER is empty") [[ -z "${EXT_TEST_COVERAGE}" ]] && (echo "EXT_TEST_COVERAGE is empty") -# dir -pwd -ls -alh - # activate virtualenv source azEnv/bin/activate -# remove extension -echo "Remove existing aks-preview extension (if any)" -if az extension remove --name aks-preview || azdev extension remove aks-preview; then - deactivate - source azEnv/bin/activate -fi - -# install latest extension -echo "Install the latest aks-preview extension and re-activate the virtualenv" -azdev extension add aks-preview -az extension list -azdev extension list | grep "aks-preview" -C 5 -deactivate -source azEnv/bin/activate - -# use a fake command to force trigger the command index update of azure-cli, in order to load aks-preview commands -# otherwise, cold boot execution of azdev test / pytest would only use commands in the acs module -az aks fake-command --debug || true +# setup aks-preview +./scripts/setup_venv.sh setup-akspreview # prepare run flags -run_flags="-e -em ext_matrix_default.json --no-exitfirst --report-path ./reports --reruns 3 --capture=sys" +run_flags="-e --no-exitfirst --report-path ./reports --reruns 3 --capture=sys" # parallel -if [ ${PARALLELISM} -ge 2 ]; then +if [[ ${PARALLELISM} -ge 2 ]]; then run_flags+=" -j ${PARALLELISM}" else run_flags+=" -s" fi -# test cases -if [[ -n ${TEST_CASES} ]]; then - run_flags+=" -t ${TEST_CASES}" -fi # ext matrix if [[ -n ${EXT_TEST_MATRIX} ]]; then - run_flags+=" -em ${EXT_TEST_MATRIX}" + run_flags+=" -em ./configs/${EXT_TEST_MATRIX}" fi # ext extra filter if [[ -n ${EXT_TEST_FILTER} ]]; then @@ -75,17 +50,17 @@ if [[ ${TEST_MODE} == "record" || ${TEST_MODE} == "all" ]]; then run_flags+=" --json-report-file=ext_report.json" run_flags+=" --xml-file=ext_result.xml" echo "run flags: ${run_flags}" - echo "${run_flags}" | xargs python -u az_aks_tool/main.py + azaks ${run_flags} fi # live test if [[ ${TEST_MODE} == "live" || ${TEST_MODE} == "all" ]]; then echo "Test in live mode!" - az login --service-principal -u ${AZCLI_ALT_CLIENT_ID} -p ${AZCLI_ALT_CLIENT_SECRET} -t ${TENANT_ID} - az account set -s ${AZCLI_ALT_SUBSCRIPTION_ID} + az login --service-principal -u "${AZCLI_ALT_CLIENT_ID}" -p "${AZCLI_ALT_CLIENT_SECRET}" -t "${TENANT_ID}" + az account set -s "${AZCLI_ALT_SUBSCRIPTION_ID}" az account show run_flags+=" -l --json-report-file=ext_live_report.json" run_flags+=" --xml-file=ext_live_result.xml" echo "run flags: ${run_flags}" - echo "${run_flags}" | xargs python -u az_aks_tool/main.py + azaks ${run_flags} fi diff --git a/src/aks-preview/azcli_aks_live_test/scripts/test_ext_unit.sh b/src/aks-preview/azcli_aks_live_test/scripts/test_ext_unit.sh new file mode 100755 index 00000000000..c76feba0607 --- /dev/null +++ b/src/aks-preview/azcli_aks_live_test/scripts/test_ext_unit.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +# bash options +set -o errexit +set -o nounset +set -o pipefail +set -o xtrace + +# const +aks_preview_base_dir="azure-cli-extensions/src/aks-preview/azext_aks_preview" + +# activate virtualenv +source azEnv/bin/activate + +# setup aks-preview +./scripts/setup_venv.sh setup-akspreview + +# unit test & coverage report +azext_aks_preview_unit_test_failed="" +pushd ${aks_preview_base_dir} +# clean existing coverage report +(coverage combine || true) && (coverage erase || true) +# perform unit test with module 'unittest' +# since recording test (performed in test_ext_live.sh) is based on module 'pytest', so skip here +# coverage run --source=. --omit=*/vendored_sdks/*,*/tests/* -p -m pytest +if ! coverage run --source=. --omit=*/vendored_sdks/*,*/tests/* -p -m unittest discover; then + azext_aks_preview_unit_test_failed="true" +fi +# generate & copy coverage report +coverage combine +coverage report -m +coverage json -o coverage_azext_aks_preview.json +popd +mkdir -p reports/ && cp ${aks_preview_base_dir}/coverage_azext_aks_preview.json reports/ + +if [[ ${azext_aks_preview_unit_test_failed} == "true" ]]; then + echo "Unit test failed!" + exit 1 +fi diff --git a/src/aks-preview/azcli_aks_live_test/scripts/test_raw_cases.sh b/src/aks-preview/azcli_aks_live_test/scripts/test_raw_cases.sh new file mode 100644 index 00000000000..8f132ac633b --- /dev/null +++ b/src/aks-preview/azcli_aks_live_test/scripts/test_raw_cases.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +# bash options +set -o errexit +set -o nounset +set -o pipefail +set -o xtrace diff --git a/src/aks-preview/azcli_aks_live_test/transcribe_env.sh b/src/aks-preview/azcli_aks_live_test/scripts/transcribe_env.sh similarity index 88% rename from src/aks-preview/azcli_aks_live_test/transcribe_env.sh rename to src/aks-preview/azcli_aks_live_test/scripts/transcribe_env.sh index ea56ba31f61..8e18c380cfd 100755 --- a/src/aks-preview/azcli_aks_live_test/transcribe_env.sh +++ b/src/aks-preview/azcli_aks_live_test/scripts/transcribe_env.sh @@ -26,6 +26,9 @@ set -o xtrace [[ -z "${TEST_MODE}" ]] && (echo "TEST_MODE is empty"; exit 1) [[ -z "${PARALLELISM}" ]] && (echo "PARALLELISM is empty"; exit 1) [[ -z "${TEST_CASES}" ]] && (echo "TEST_CASES is empty") +[[ -z "${CLI_TEST_MATRIX}" ]] && (echo "CLI_TEST_MATRIX is empty") +[[ -z "${CLI_TEST_FILTER}" ]] && (echo "CLI_TEST_FILTER is empty") +[[ -z "${CLI_TEST_COVERAGE}" ]] && (echo "CLI_TEST_COVERAGE is empty") [[ -z "${EXT_TEST_MATRIX}" ]] && (echo "EXT_TEST_MATRIX is empty") [[ -z "${EXT_TEST_FILTER}" ]] && (echo "EXT_TEST_FILTER is empty") [[ -z "${EXT_TEST_COVERAGE}" ]] && (echo "EXT_TEST_COVERAGE is empty") @@ -33,7 +36,6 @@ set -o xtrace [[ -z "${CLI_BRANCH}" ]] && (echo "CLI_BRANCH is empty"; exit 1) [[ -z "${EXT_REPO}" ]] && (echo "EXT_REPO is empty"; exit 1) [[ -z "${EXT_BRANCH}" ]] && (echo "EXT_BRANCH is empty"; exit 1) -[[ -z "${MANUAL_EXT}" ]] && (echo "MANUAL_EXT is empty"; exit 1) # clear cat /dev/null > env.list @@ -64,6 +66,9 @@ echo "COVERAGE=${COVERAGE}" >> env.list echo "TEST_MODE=${TEST_MODE}" >> env.list echo "PARALLELISM=${PARALLELISM}" >> env.list echo "TEST_CASES=${TEST_CASES}" >> env.list +echo "CLI_TEST_MATRIX=${CLI_TEST_MATRIX}" >> env.list +echo "CLI_TEST_FILTER=${CLI_TEST_FILTER}" >> env.list +echo "CLI_TEST_COVERAGE=${CLI_TEST_COVERAGE}" >> env.list echo "EXT_TEST_MATRIX=${EXT_TEST_MATRIX}" >> env.list echo "EXT_TEST_FILTER=${EXT_TEST_FILTER}" >> env.list echo "EXT_TEST_COVERAGE=${EXT_TEST_COVERAGE}" >> env.list @@ -73,4 +78,3 @@ echo "CLI_REPO=${CLI_REPO}" >> env.list echo "CLI_BRANCH=${CLI_BRANCH}" >> env.list echo "EXT_REPO=${EXT_REPO}" >> env.list echo "EXT_BRANCH=${EXT_BRANCH}" >> env.list -echo "MANUAL_EXT=${MANUAL_EXT}" >> env.list diff --git a/src/aks-preview/azcli_aks_live_test/setup_venv.sh b/src/aks-preview/azcli_aks_live_test/setup_venv.sh deleted file mode 100755 index e63b00264f8..00000000000 --- a/src/aks-preview/azcli_aks_live_test/setup_venv.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash - -# bash options -set -o errexit -set -o nounset -set -o pipefail -set -o xtrace - -# check var -PYTHON_VERSION=${PYTHON_VERSION:-"3.8"} - -# dir -pwd -ls -alh - -# delete existing venv -rm -rf azEnv || true - -# install python packages -python${PYTHON_VERSION} -m venv azEnv -source azEnv/bin/activate -python -m pip install -U pip -# install azdev, used later to install azcli and extension -pip install azdev==0.1.32 -# install pytest plugins -pip install pytest-json-report pytest-rerunfailures --upgrade -# pip install pytest-html --upgrade -# module for measuring code coverage -pip install coverage - -# pre-install: check existing az -which az || az version || az extension list || true - -# install az from cloned repos with azdev -azdev setup -c azure-cli/ -r azure-cli-extensions/ -deactivate - -# post-install: reactivate venv to check installation result -source azEnv/bin/activate -which az && az version - -# mkdir to store reports -mkdir -p reports/ - -# export PYTHONPATH -export PYTHONPATH=$(pwd) diff --git a/src/aks-preview/azcli_aks_live_test/test_cli_live.sh b/src/aks-preview/azcli_aks_live_test/test_cli_live.sh deleted file mode 100755 index 412e3c6702a..00000000000 --- a/src/aks-preview/azcli_aks_live_test/test_cli_live.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash - -# bash options -set -o errexit -set -o nounset -set -o pipefail -set -o xtrace - -# check var -[[ -z "${TENANT_ID}" ]] && (echo "TENANT_ID is empty"; exit 1) -[[ -z "${AZCLI_ALT_SUBSCRIPTION_ID}" ]] && (echo "AZCLI_ALT_SUBSCRIPTION_ID is empty"; exit 1) -[[ -z "${AZCLI_ALT_CLIENT_ID}" ]] && (echo "AZCLI_ALT_CLIENT_ID is empty"; exit 1) -[[ -z "${AZCLI_ALT_CLIENT_SECRET}" ]] && (echo "AZCLI_ALT_CLIENT_SECRET is empty"; exit 1) -[[ -z "${TEST_MODE}" ]] && (echo "TEST_MODE is empty"; exit 1) -[[ -z "${PARALLELISM}" ]] && (echo "PARALLELISM is empty"; exit 1) - -# dir -pwd -ls -alh - -# activate virtualenv -source azEnv/bin/activate - -# remove extension -echo "Remove existing aks-preview extension (if any)" -if az extension remove --name aks-preview || azdev extension remove aks-preview; then - deactivate - source azEnv/bin/activate -fi - -# test cli -if [[ ${TEST_MODE} == "record" || ${TEST_MODE} == "all" ]]; then - echo "Test in record mode!" - azdev test acs --no-exitfirst --xml-path cli_result.xml --discover -a "-n ${PARALLELISM} --json-report --json-report-file=cli_report.json --reruns 3 --capture=sys" - cp *cli_report.json *cli_result.xml reports/ -fi - -if [[ ${TEST_MODE} == "live" || ${TEST_MODE} == "all" ]]; then - echo "Test in live mode!" - az login --service-principal -u ${AZCLI_ALT_CLIENT_ID} -p ${AZCLI_ALT_CLIENT_SECRET} -t ${TENANT_ID} - az account set -s ${AZCLI_ALT_SUBSCRIPTION_ID} - az account show - azdev test acs --live --no-exitfirst --xml-path cli_live_result.xml --discover -a "-n ${PARALLELISM} --json-report --json-report-file=cli_live_report.json --reruns 3 --capture=sys" - cp *cli_live_report.json *cli_live_result.xml reports/ -fi diff --git a/src/aks-preview/azcli_aks_live_test/test_cli_unit.sh b/src/aks-preview/azcli_aks_live_test/test_cli_unit.sh deleted file mode 100755 index 1c70f2f4c6b..00000000000 --- a/src/aks-preview/azcli_aks_live_test/test_cli_unit.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -# bash options -set -o errexit -set -o nounset -set -o pipefail -set -o xtrace - -# dir -pwd -ls -alh - -# activate virtualenv -source azEnv/bin/activate - -# remove extension -echo "Remove existing aks-preview extension (if any)" -if az extension remove --name aks-preview || azdev extension remove aks-preview; then - deactivate - source azEnv/bin/activate -fi - -echo "Implementing, pass for now!" diff --git a/src/aks-preview/azcli_aks_live_test/test_ext_unit.sh b/src/aks-preview/azcli_aks_live_test/test_ext_unit.sh deleted file mode 100755 index db13e91fe5e..00000000000 --- a/src/aks-preview/azcli_aks_live_test/test_ext_unit.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env bash - -# bash options -set -o errexit -set -o nounset -set -o pipefail -set -o xtrace - -# dir -pwd -ls -alh - -# activate virtualenv -source azEnv/bin/activate - -# remove extension -echo "Remove existing aks-preview extension (if any)" -if az extension remove --name aks-preview || azdev extension remove aks-preview; then - deactivate - source azEnv/bin/activate -fi - -# install latest extension -echo "Install the latest aks-preview extension and re-activate the virtualenv" -azdev extension add aks-preview -az extension list -azdev extension list | grep "aks-preview" -C 5 -deactivate -source azEnv/bin/activate - -# use a fake command to force trigger the command index update of azure-cli, in order to load aks-preview commands -# otherwise, cold boot execution of azdev test / pytest would only use commands in the acs module -az aks fake-command --debug || true - -# unit test & coverage report -# az_aks_tool -az_aks_tool_unit_test_result="" -pushd azure-cli-extensions/src/aks-preview/az_aks_tool/ -# clean existing coverage report -(coverage combine || true) && (coverage erase || true) -if ! coverage run --source=. --omit=*/tests/* -p -m unittest discover; then - az_aks_tool_unit_test_result="error" -fi -# currently no test written in pytest format under 'az_aks_tool/' -# coverage run --source=. --omit=*/tests/* -p -m pytest -coverage combine && coverage json -o coverage_az_aks_tool.json -coverage report -m -popd -cp azure-cli-extensions/src/aks-preview/az_aks_tool/coverage_az_aks_tool.json reports/ - -# azext_aks_preview -azext_aks_preview_unit_test_result="" -pushd azure-cli-extensions/src/aks-preview/azext_aks_preview -# clean existing coverage report -(coverage combine || true) && (coverage erase || true) -# currently test using module 'unittest' is the same as module 'pytest', and test using 'pytest' is just recording test -if ! coverage run --source=. --omit=*/vendored_sdks/*,*/tests/* -p -m unittest discover || ! coverage run --source=. --omit=*/vendored_sdks/*,*/tests/* -p -m pytest; then - azext_aks_preview_unit_test_result="error" -fi -coverage combine && coverage json -o coverage_azext_aks_preview.json -coverage report -m -popd -cp azure-cli-extensions/src/aks-preview/azext_aks_preview/coverage_azext_aks_preview.json reports/ - -if [[ ${az_aks_tool_unit_test_result} == "error" || ${azext_aks_preview_unit_test_result} == "error" ]]; then - echo "Unit test failed!" - exit 1 -fi diff --git a/src/aks-preview/azcli_aks_live_test/vsts-azcli-aks-live-test.yaml b/src/aks-preview/azcli_aks_live_test/vsts-azcli-aks-live-test.yaml index cf082cd587a..d3383b9fc75 100644 --- a/src/aks-preview/azcli_aks_live_test/vsts-azcli-aks-live-test.yaml +++ b/src/aks-preview/azcli_aks_live_test/vsts-azcli-aks-live-test.yaml @@ -1,4 +1,4 @@ -name: $(Date:yyyyMMdd)$(Rev:.r)_Python$(PYTHON_VERSION)_Coverage-$(COVERAGE)_Mode-$(TEST_MODE)_Branch-$(Build.SourceBranchName) +name: $(Date:yyyyMMdd)$(Rev:.r)_Python$(PYTHON_VERSION)_Coverage-$(COVERAGE)_Mode-$(TEST_MODE) trigger: none @@ -10,6 +10,17 @@ pr: include: - src/aks-preview/ +variables: + - group: azcli-aks-tool + - name: ContainerName + value: "azcli-aks-live-test" + - name: REPO_NAME + value: "azure-cli-extensions" + - name: LIVE_TEST_BASE_DIR + value: "azure-cli-extensions/src/aks-preview/azcli_aks_live_test" + - name: AKS_PREVIEW_BASE_DIR + value: "azure-cli-extensions/src/aks-preview/azext_aks_preview" + jobs: - job: LiveTest pool: @@ -18,24 +29,21 @@ jobs: displayName: "Live Test with Python" steps: - bash: | - pwd - ls -alh - mkdir azure-cli-extensions + mkdir $(REPO_NAME) shopt -s extglob dotglob - mv !(azure-cli-extensions) azure-cli-extensions + mv !($(REPO_NAME)) $(REPO_NAME) shopt -u extglob dotglob - ls -alh - displayName: "Move All Checkout Files to the Newly Created 'azure-cli-extensions' Directory" + displayName: "Move All Files to a Subdirectory" - bash: | - ./azure-cli-extensions/src/aks-preview/azcli_aks_live_test/clone_repo.sh + $(LIVE_TEST_BASE_DIR)/scripts/clone_repo.sh condition: succeeded() - displayName: "Clone GitHub Repo and Move Live Test Related Files" + displayName: "Clone GitHub Repo(s) and Extract Test Scripts" - bash: | - ./prepare_image.sh + ./scripts/prepare_image.sh condition: succeeded() - displayName: "Prepare Live Test Image" + displayName: "Prepare Test Image" - bash: | - ./start_container.sh + ./scripts/start_container.sh $(ContainerName) env: MAPPED_AZCLI_ALT_CLIENT_SECRET: $(AZCLI_ALT_CLIENT_SECRET) BUILD_REASON: $(Build.Reason) @@ -43,22 +51,35 @@ jobs: condition: succeeded() displayName: "Start Container" - bash: | - docker exec "azcli-aks-live-test-container" /opt/setup_venv.sh + docker exec $(ContainerName) /opt/scripts/setup_venv.sh setup-tool y + docker exec $(ContainerName) /opt/scripts/setup_venv.sh setup-az n azure-cli/ azure-cli-extensions/ condition: succeeded() displayName: "Set up Virtual Environment" - bash: | - docker exec "azcli-aks-live-test-container" /opt/test_cli_live.sh + docker exec $(ContainerName) /opt/scripts/test_cli_live.sh condition: and(succeeded(), in(variables['COVERAGE'], 'cli', 'all')) displayName: Perform Live Test for CLI - bash: | - docker exec "azcli-aks-live-test-container" /opt/test_ext_live.sh + docker exec $(ContainerName) /opt/scripts/test_ext_live.sh condition: and(succeededOrFailed(), in(variables['COVERAGE'], 'ext', 'all')) displayName: Perform Live Test for EXT - task: CopyFiles@2 inputs: contents: 'reports/**' + flattenFolders: true targetFolder: $(Build.ArtifactStagingDirectory) condition: succeededOrFailed() + displayName: "Copy Reports & Logs" + - bash: mkdir -p $(Build.ArtifactStagingDirectory)/recordings + condition: succeededOrFailed() + displayName: "Create Dir for Recordings" + - task: CopyFiles@2 + inputs: + contents: '$(AKS_PREVIEW_BASE_DIR)/tests/latest/recordings/**' + flattenFolders: true + targetFolder: $(Build.ArtifactStagingDirectory)/recordings + condition: succeededOrFailed() + displayName: "Copy Recordings" - task: PublishBuildArtifacts@1 inputs: pathToPublish: $(Build.ArtifactStagingDirectory) diff --git a/src/aks-preview/azcli_aks_live_test/vsts-azcli-aks-unit-test.yaml b/src/aks-preview/azcli_aks_live_test/vsts-azcli-aks-unit-test.yaml index 5cd8c268ce8..0145ab2686c 100644 --- a/src/aks-preview/azcli_aks_live_test/vsts-azcli-aks-unit-test.yaml +++ b/src/aks-preview/azcli_aks_live_test/vsts-azcli-aks-unit-test.yaml @@ -1,4 +1,4 @@ -name: $(Date:yyyyMMdd)$(Rev:.r)_Python$(PYTHON_VERSION)_Coverage-$(COVERAGE)_Mode-$(TEST_MODE)_Branch-$(Build.SourceBranchName) +name: $(Date:yyyyMMdd)$(Rev:.r)_Python$(PYTHON_VERSION)_Coverage-$(COVERAGE)_Mode-$(TEST_MODE) trigger: none @@ -10,6 +10,15 @@ pr: include: - src/aks-preview/ +variables: + - group: azcli-aks-tool + - name: ContainerName + value: "azcli-aks-unit-test" + - name: REPO_NAME + value: "azure-cli-extensions" + - name: LIVE_TEST_BASE_DIR + value: "azure-cli-extensions/src/aks-preview/azcli_aks_live_test" + jobs: - job: UnitTest pool: @@ -18,24 +27,21 @@ jobs: displayName: "Unit Test with Python" steps: - bash: | - pwd - ls -alh - mkdir azure-cli-extensions + mkdir $(REPO_NAME) shopt -s extglob dotglob - mv !(azure-cli-extensions) azure-cli-extensions + mv !($(REPO_NAME)) $(REPO_NAME) shopt -u extglob dotglob - ls -alh - displayName: "Move All Checkout Files to the Newly Created 'azure-cli-extensions' Directory" + displayName: "Move All Files to a Subdirectory" - bash: | - ./azure-cli-extensions/src/aks-preview/azcli_aks_live_test/clone_repo.sh + $(LIVE_TEST_BASE_DIR)/scripts/clone_repo.sh condition: succeeded() - displayName: "Clone GitHub Repo and Move Test Related Files" + displayName: "Clone GitHub Repo(s) and Extract Test Scripts" - bash: | - ./prepare_image.sh + ./scripts/prepare_image.sh condition: succeeded() displayName: "Prepare Test Image" - bash: | - ./start_container.sh "azcli-aks-unit-test-container" + ./scripts/start_container.sh $(ContainerName) env: MAPPED_AZCLI_ALT_CLIENT_SECRET: $(AZCLI_ALT_CLIENT_SECRET) BUILD_REASON: $(Build.Reason) @@ -43,22 +49,25 @@ jobs: condition: succeeded() displayName: "Start Container" - bash: | - docker exec "azcli-aks-unit-test-container" /opt/setup_venv.sh + docker exec $(ContainerName) /opt/scripts/setup_venv.sh setup-tool y + docker exec $(ContainerName) /opt/scripts/setup_venv.sh setup-az n azure-cli/ azure-cli-extensions/ condition: succeeded() displayName: "Set up Virtual Environment" - bash: | - docker exec "azcli-aks-unit-test-container" /opt/test_cli_unit.sh + docker exec $(ContainerName) /opt/scripts/test_cli_unit.sh condition: and(succeeded(), in(variables['COVERAGE'], 'cli', 'all')) displayName: Perform Unit Test for CLI - bash: | - docker exec "azcli-aks-unit-test-container" /opt/test_ext_unit.sh + docker exec $(ContainerName) /opt/scripts/test_ext_unit.sh condition: and(succeededOrFailed(), in(variables['COVERAGE'], 'ext', 'all')) displayName: Perform Unit Test for EXT - task: CopyFiles@2 inputs: contents: 'reports/**' + flattenFolders: true targetFolder: $(Build.ArtifactStagingDirectory) condition: succeededOrFailed() + displayName: "Copy Reports & Logs" - task: PublishBuildArtifacts@1 inputs: pathToPublish: $(Build.ArtifactStagingDirectory) diff --git a/src/aks-preview/azext_aks_preview/__init__.py b/src/aks-preview/azext_aks_preview/__init__.py index 1f8e4dffc7a..589f29c61d8 100644 --- a/src/aks-preview/azext_aks_preview/__init__.py +++ b/src/aks-preview/azext_aks_preview/__init__.py @@ -5,7 +5,7 @@ from azure.cli.core import AzCommandsLoader -from azure.cli.core.profiles import register_resource_type +from azure.cli.core.profiles import register_resource_type, SDKProfile # pylint: disable=unused-import import azext_aks_preview._help @@ -16,7 +16,11 @@ class ContainerServiceCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType - register_resource_type('latest', CUSTOM_MGMT_AKS_PREVIEW, '2021-05-01') + register_resource_type( + "latest", + CUSTOM_MGMT_AKS_PREVIEW, + SDKProfile("2021-05-01", {"container_services": "2017-07-01"}), + ) acs_custom = CliCommandType(operations_tmpl='azext_aks_preview.custom#{}') super(ContainerServiceCommandsLoader, self).__init__(cli_ctx=cli_ctx, diff --git a/src/aks-preview/azext_aks_preview/_client_factory.py b/src/aks-preview/azext_aks_preview/_client_factory.py index 9444d72256c..4cce88ec7c6 100644 --- a/src/aks-preview/azext_aks_preview/_client_factory.py +++ b/src/aks-preview/azext_aks_preview/_client_factory.py @@ -12,8 +12,6 @@ CUSTOM_MGMT_AKS_PREVIEW = CustomResourceType('azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks', 'ContainerServiceClient') -CUSTOM_MGMT_AKS = CustomResourceType('azext_aks_preview.vendored_sdks.azure_mgmt_aks', - 'ContainerServiceClient') def cf_storage(cli_ctx, subscription_id=None): diff --git a/src/aks-preview/azext_aks_preview/_consts.py b/src/aks-preview/azext_aks_preview/_consts.py index 642e28fca36..961bb5b234d 100644 --- a/src/aks-preview/azext_aks_preview/_consts.py +++ b/src/aks-preview/azext_aks_preview/_consts.py @@ -23,6 +23,7 @@ CONST_MONITORING_ADDON_NAME = "omsagent" CONST_MONITORING_LOG_ANALYTICS_WORKSPACE_RESOURCE_ID = "logAnalyticsWorkspaceResourceID" +CONST_MONITORING_USING_AAD_MSI_AUTH = "useAADAuth" CONST_VIRTUAL_NODE_ADDON_NAME = "aciConnector" CONST_VIRTUAL_NODE_SUBNET_NAME = "SubnetName" diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index d07f22936e1..05ff0a95486 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -222,6 +222,9 @@ - name: --workspace-resource-id type: string short-summary: The resource ID of an existing Log Analytics Workspace to use for storing monitoring data. If not specified, uses the default Log Analytics Workspace if it exists, otherwise creates one. + - name: --enable-msi-auth-for-monitoring + type: bool + short-summary: Send monitoring data to Log Analytics using the cluster's assigned identity (instead of the Log Analytics Workspace's shared key). - name: --enable-cluster-autoscaler type: bool short-summary: Enable cluster autoscaler, default value is false. @@ -1042,6 +1045,9 @@ - name: --workspace-resource-id type: string short-summary: The resource ID of an existing Log Analytics Workspace to use for storing monitoring data. + - name: --enable-msi-auth-for-monitoring + type: bool + short-summary: Send monitoring data to Log Analytics using the cluster's assigned identity (instead of the Log Analytics Workspace's shared key). - name: --subnet-name -s type: string short-summary: The subnet name for the virtual node to use. diff --git a/src/aks-preview/azext_aks_preview/_loadbalancer.py b/src/aks-preview/azext_aks_preview/_loadbalancer.py index 51fd014e6f2..1bcdde48e72 100644 --- a/src/aks-preview/azext_aks_preview/_loadbalancer.py +++ b/src/aks-preview/azext_aks_preview/_loadbalancer.py @@ -58,16 +58,20 @@ def configure_load_balancer_profile(managed_outbound_ip_count, outbound_ips, out outbound_ip_prefix_resources = _get_load_balancer_outbound_ip_prefixes(outbound_ip_prefixes) if managed_outbound_ip_count or outbound_ip_resources or outbound_ip_prefix_resources: - profile.managed_outbound_ips = None - profile.outbound_ips = None + # ips -> i_ps due to track 2 naming issue + profile.managed_outbound_i_ps = None + # ips -> i_ps due to track 2 naming issue + profile.outbound_i_ps = None profile.outbound_ip_prefixes = None if managed_outbound_ip_count: - profile.managed_outbound_ips = ManagedClusterLoadBalancerProfileManagedOutboundIPs( + # ips -> i_ps due to track 2 naming issue + profile.managed_outbound_i_ps = ManagedClusterLoadBalancerProfileManagedOutboundIPs( count=managed_outbound_ip_count ) if outbound_ip_resources: - profile.outbound_ips = ManagedClusterLoadBalancerProfileOutboundIPs( - public_ips=outbound_ip_resources + # ips -> i_ps due to track 2 naming issue + profile.outbound_i_ps = ManagedClusterLoadBalancerProfileOutboundIPs( + public_i_ps=outbound_ip_resources ) if outbound_ip_prefix_resources: profile.outbound_ip_prefixes = ManagedClusterLoadBalancerProfileOutboundIPPrefixes( diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 592134fdf19..24853f6e819 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -91,6 +91,7 @@ def load_arguments(self, _): c.argument('pod_subnet_id', type=str, validator=validate_pod_subnet_id) c.argument('ppg') c.argument('workspace_resource_id') + c.argument('enable_msi_auth_for_monitoring', arg_type=get_three_state_flag(), is_preview=True) c.argument('skip_subnet_role_assignment', action='store_true') c.argument('enable_fips_image', action='store_true', is_preview=True) c.argument('enable_cluster_autoscaler', action='store_true') @@ -261,6 +262,8 @@ def load_arguments(self, _): c.argument('appgw_subnet_id', options_list=['--appgw-subnet-id'], arg_group='Application Gateway') c.argument('appgw_watch_namespace', options_list=['--appgw-watch-namespace'], arg_group='Application Gateway') c.argument('enable_secret_rotation', action='store_true') + c.argument('workspace_resource_id') + c.argument('enable_msi_auth_for_monitoring', arg_type=get_three_state_flag(), is_preview=True) with self.argument_context('aks get-credentials') as c: c.argument('admin', options_list=['--admin', '-a'], default=False) diff --git a/src/aks-preview/azext_aks_preview/commands.py b/src/aks-preview/azext_aks_preview/commands.py index 03ab1069e77..a8e31f01ce2 100644 --- a/src/aks-preview/azext_aks_preview/commands.py +++ b/src/aks-preview/azext_aks_preview/commands.py @@ -24,12 +24,14 @@ def load_command_table(self, _): managed_clusters_sdk = CliCommandType( operations_tmpl='azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.' 'operations._managed_clusters_operations#ManagedClustersOperations.{}', + operation_group='managed_clusters', client_factory=cf_managed_clusters ) container_services_sdk = CliCommandType( operations_tmpl='azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.' 'operations.container_service_operations#ContainerServicesOperations.{}', + operation_group='container_services', client_factory=cf_container_services ) @@ -67,8 +69,8 @@ def load_command_table(self, _): confirmation='Kubernetes will be unavailable during certificate rotation process.\n' + 'Are you sure you want to perform this operation?') g.wait_command('wait') - g.command('stop', 'stop', supports_no_wait=True) - g.command('start', 'start', supports_no_wait=True) + g.command('stop', 'begin_stop', supports_no_wait=True) + g.command('start', 'begin_start', supports_no_wait=True) g.custom_command('get-os-options', 'aks_get_os_options') # AKS container service commands diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 6b2b27d7621..57cda86167d 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -73,7 +73,7 @@ ManagedClusterIdentity, ManagedClusterAPIServerAccessProfile, ManagedClusterSKU, - ManagedClusterIdentityUserAssignedIdentitiesValue, + Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties, ManagedClusterAutoUpgradeProfile, KubeletConfig, LinuxOSConfig, @@ -83,7 +83,7 @@ ManagedClusterPodIdentityException, UserAssignedIdentity, RunCommandRequest, - ManagedClusterPropertiesIdentityProfileValue) + ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties) from ._client_factory import cf_resource_groups from ._client_factory import get_auth_management_client from ._client_factory import get_graph_rbac_management_client @@ -102,6 +102,7 @@ from ._consts import CONST_HTTP_APPLICATION_ROUTING_ADDON_NAME from ._consts import CONST_MONITORING_ADDON_NAME from ._consts import CONST_MONITORING_LOG_ANALYTICS_WORKSPACE_RESOURCE_ID +from ._consts import CONST_MONITORING_USING_AAD_MSI_AUTH from ._consts import CONST_VIRTUAL_NODE_ADDON_NAME from ._consts import CONST_VIRTUAL_NODE_SUBNET_NAME from ._consts import CONST_AZURE_POLICY_ADDON_NAME @@ -987,6 +988,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to outbound_type=None, enable_addons=None, workspace_resource_id=None, + enable_msi_auth_for_monitoring=False, min_count=None, max_count=None, vnet_subnet_id=None, @@ -1144,7 +1146,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to service_principal_profile = None principal_obj = None - # If customer explicitly provide a service principal, disable managed identity. + # If customer explicitly provides a service principal, disable managed identity. if service_principal and client_secret: enable_managed_identity = False if not enable_managed_identity: @@ -1250,28 +1252,34 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to ) addon_profiles = _handle_addons_args( - cmd, - enable_addons, - subscription_id, - resource_group_name, - {}, - workspace_resource_id, - appgw_name, - appgw_subnet_prefix, - appgw_subnet_cidr, - appgw_id, - appgw_subnet_id, - appgw_watch_namespace, - enable_sgxquotehelper, - aci_subnet_name, - vnet_subnet_id, - enable_secret_rotation + cmd=cmd, + addons_str=enable_addons, + subscription_id=subscription_id, + resource_group_name=resource_group_name, + addon_profiles={}, + workspace_resource_id=workspace_resource_id, + enable_msi_auth_for_monitoring=enable_msi_auth_for_monitoring, + appgw_name=appgw_name, + appgw_subnet_prefix=appgw_subnet_prefix, + appgw_subnet_cidr=appgw_subnet_cidr, + appgw_id=appgw_id, + appgw_subnet_id=appgw_subnet_id, + appgw_watch_namespace=appgw_watch_namespace, + enable_sgxquotehelper=enable_sgxquotehelper, + aci_subnet_name=aci_subnet_name, + vnet_subnet_id=vnet_subnet_id, + enable_secret_rotation=enable_secret_rotation, ) monitoring = False if CONST_MONITORING_ADDON_NAME in addon_profiles: monitoring = True - _ensure_container_insights_for_monitoring( - cmd, addon_profiles[CONST_MONITORING_ADDON_NAME]) + if enable_msi_auth_for_monitoring and not enable_managed_identity: + raise ArgumentUsageError("--enable-msi-auth-for-monitoring can not be used on clusters with service principal auth.") + _ensure_container_insights_for_monitoring(cmd, + addon_profiles[CONST_MONITORING_ADDON_NAME], subscription_id, + resource_group_name, name, location, + aad_route=enable_msi_auth_for_monitoring, create_dcr=True, + create_dcra=False) # addon is in the list and is enabled ingress_appgw_addon_enabled = CONST_INGRESS_APPGW_ADDON_NAME in addon_profiles and \ @@ -1293,7 +1301,8 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to aad_profile = ManagedClusterAADProfile( managed=True, enable_azure_rbac=enable_azure_rbac, - admin_group_object_ids=_parse_comma_separated_list( + # ids -> i_ds due to track 2 naming issue + admin_group_object_i_ds=_parse_comma_separated_list( aad_admin_group_object_ids), tenant_id=aad_tenant_id ) @@ -1334,7 +1343,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to ) elif enable_managed_identity and assign_identity: user_assigned_identity = { - assign_identity: ManagedClusterIdentityUserAssignedIdentitiesValue() + assign_identity: Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties() } identity = ManagedClusterIdentity( type="UserAssigned", @@ -1347,7 +1356,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to raise CLIError('--assign-kubelet-identity can only be specified when --assign-identity is specified') kubelet_identity = _get_user_assigned_identity(cmd.cli_ctx, assign_kubelet_identity) identity_profile = { - 'kubeletidentity': ManagedClusterPropertiesIdentityProfileValue( + 'kubeletidentity': ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties( resource_id=assign_kubelet_identity, client_id=kubelet_identity.client_id, object_id=kubelet_identity.principal_id @@ -1444,6 +1453,10 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to retry_exception = Exception(None) for _ in range(0, max_retry): try: + if monitoring and enable_msi_auth_for_monitoring: + # Creating a DCR Association (for the monitoring addon) requires waiting for cluster creation to finish + no_wait = False + created_cluster = _put_managed_cluster_ensuring_permission( cmd, client, @@ -1460,6 +1473,15 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to attach_acr, headers, no_wait) + + if monitoring and enable_msi_auth_for_monitoring: + # Create the DCR Association here + _ensure_container_insights_for_monitoring(cmd, + addon_profiles[CONST_MONITORING_ADDON_NAME], subscription_id, + resource_group_name, name, location, + aad_route=enable_msi_auth_for_monitoring, create_dcr=False, + create_dcra=True) + return created_cluster except CloudError as ex: retry_exception = ex @@ -1733,7 +1755,8 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches, if aad_tenant_id is not None: instance.aad_profile.tenant_id = aad_tenant_id if aad_admin_group_object_ids is not None: - instance.aad_profile.admin_group_object_ids = _parse_comma_separated_list( + # ids -> i_ds due to track 2 naming issue + instance.aad_profile.admin_group_object_i_ds = _parse_comma_separated_list( aad_admin_group_object_ids) if enable_azure_rbac and disable_azure_rbac: raise CLIError( @@ -1807,7 +1830,7 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches, ) elif goal_identity_type == "userassigned": user_assigned_identity = { - assign_identity: ManagedClusterIdentityUserAssignedIdentitiesValue() + assign_identity: Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties() } instance.identity = ManagedClusterIdentity( type="UserAssigned", @@ -2171,7 +2194,7 @@ def aks_scale(cmd, # pylint: disable=unused-argument # null out the SP and AAD profile because otherwise validation complains instance.service_principal_profile = None instance.aad_profile = None - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, name, instance) raise CLIError('The nodepool "{}" was not found.'.format(nodepool_name)) @@ -2263,7 +2286,7 @@ def aks_upgrade(cmd, # pylint: disable=unused-argument, too-many-return-state headers = get_aks_custom_headers(aks_custom_headers) - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, name, instance, custom_headers=headers) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, name, instance, headers=headers) def aks_runcommand(cmd, client, resource_group_name, name, command_string="", command_files=None): @@ -2280,8 +2303,8 @@ def aks_runcommand(cmd, client, resource_group_name, name, command_string="", co request_payload.cluster_token = _get_dataplane_aad_token( cmd.cli_ctx, "6dae42f8-4368-4678-94ff-3960e28e3630") - commandResultFuture = client.run_command( - resource_group_name, name, request_payload, long_running_operation_timeout=5, retry_total=0) + commandResultFuture = client.begin_run_command( + resource_group_name, name, request_payload, polling_interval=5, retry_total=0) return _print_command_result(cmd.cli_ctx, commandResultFuture.result(300)) @@ -2376,7 +2399,7 @@ def _get_dataplane_aad_token(cli_ctx, serverAppId): def _upgrade_single_nodepool_image_version(no_wait, client, resource_group_name, cluster_name, nodepool_name): - return sdk_no_wait(no_wait, client.upgrade_node_image_version, resource_group_name, cluster_name, nodepool_name) + return sdk_no_wait(no_wait, client.begin_upgrade_node_image_version, resource_group_name, cluster_name, nodepool_name) def _handle_addons_args(cmd, # pylint: disable=too-many-statements @@ -2385,6 +2408,7 @@ def _handle_addons_args(cmd, # pylint: disable=too-many-statements resource_group_name, addon_profiles=None, workspace_resource_id=None, + enable_msi_auth_for_monitoring=False, appgw_name=None, appgw_subnet_prefix=None, appgw_subnet_cidr=None, @@ -2412,13 +2436,11 @@ def _handle_addons_args(cmd, # pylint: disable=too-many-statements # use default workspace if exists else create default workspace workspace_resource_id = _ensure_default_log_analytics_workspace_for_monitoring( cmd, subscription_id, resource_group_name) - workspace_resource_id = _sanitize_loganalytics_ws_resource_id(workspace_resource_id) - - addon_profiles[CONST_MONITORING_ADDON_NAME] = ManagedClusterAddonProfile(enabled=True, config={CONST_MONITORING_LOG_ANALYTICS_WORKSPACE_RESOURCE_ID: workspace_resource_id}) + addon_profiles[CONST_MONITORING_ADDON_NAME] = ManagedClusterAddonProfile(enabled=True, + config={CONST_MONITORING_LOG_ANALYTICS_WORKSPACE_RESOURCE_ID: workspace_resource_id, + CONST_MONITORING_USING_AAD_MSI_AUTH: enable_msi_auth_for_monitoring}) addons.remove('monitoring') - - # error out if '--enable-addons=monitoring' isn't set but workspace_resource_id is elif workspace_resource_id: raise CLIError( '"--workspace-resource-id" requires "--enable-addons monitoring".') @@ -2665,7 +2687,27 @@ def _sanitize_loganalytics_ws_resource_id(workspace_resource_id): return workspace_resource_id -def _ensure_container_insights_for_monitoring(cmd, addon): +def _ensure_container_insights_for_monitoring(cmd, + addon, + cluster_subscription, + cluster_resource_group_name, + cluster_name, + cluster_region, + remove_monitoring=False, + aad_route=False, + create_dcr=False, + create_dcra=False): + """ + Either adds the ContainerInsights solution to a LA Workspace OR sets up a DCR (Data Collection Rule) and DCRA + (Data Collection Rule Association). Both let the monitoring addon send data to a Log Analytics Workspace. + + Set aad_route == True to set up the DCR data route. Otherwise the solution route will be used. Create_dcr and + create_dcra have no effect if aad_route == False. + + Set remove_monitoring to True and create_dcra to True to remove the DCRA from a cluster. The association makes + it very hard to delete either the DCR or cluster. (It is not obvious how to even navigate to the association from + the portal, and it prevents the cluster and DCR from being deleted individually). + """ if not addon.enabled: return None @@ -2687,104 +2729,243 @@ def _ensure_container_insights_for_monitoring(cmd, addon): try: subscription_id = workspace_resource_id.split('/')[2] resource_group = workspace_resource_id.split('/')[4] + workspace_name = workspace_resource_id.split('/')[8] except IndexError: raise CLIError( 'Could not locate resource group in workspace-resource-id URL.') # region of workspace can be different from region of RG so find the location of the workspace_resource_id - resources = cf_resources(cmd.cli_ctx, subscription_id) - from azure.core.exceptions import HttpResponseError - try: - resource = resources.get_by_id( - workspace_resource_id, '2015-11-01-preview') - location = resource.location - except HttpResponseError as ex: - raise ex - - unix_time_in_millis = int( - (datetime.datetime.utcnow() - datetime.datetime.utcfromtimestamp(0)).total_seconds() * 1000.0) - - solution_deployment_name = 'ContainerInsights-{}'.format( - unix_time_in_millis) - - # pylint: disable=line-too-long - template = { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "workspaceResourceId": { - "type": "string", - "metadata": { - "description": "Azure Monitor Log Analytics Resource ID" - } - }, - "workspaceRegion": { - "type": "string", - "metadata": { - "description": "Azure Monitor Log Analytics workspace region" + if not remove_monitoring: + resources = cf_resources(cmd.cli_ctx, subscription_id) + from azure.core.exceptions import HttpResponseError + try: + resource = resources.get_by_id( + workspace_resource_id, '2015-11-01-preview') + location = resource.location + except HttpResponseError as ex: + raise ex + + if aad_route: + cluster_resource_id = f"/subscriptions/{cluster_subscription}/resourceGroups/{cluster_resource_group_name}/providers/Microsoft.ContainerService/managedClusters/{cluster_name}" + dataCollectionRuleName = f"DCR-{workspace_name}" + dcr_resource_id = f"/subscriptions/{subscription_id}/resourceGroups/{resource_group}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}" + from azure.cli.core.util import send_raw_request + from azure.cli.core.profiles import ResourceType + + if create_dcr: + # first get the association between region display names and region IDs (because for some reason + # the "which RPs are available in which regions" check returns region display names) + region_names_to_id = {} + # retry the request up to two times + for _ in range(3): + try: + location_list_url = f"https://management.azure.com/subscriptions/{subscription_id}/locations?api-version=2019-11-01" + r = send_raw_request(cmd.cli_ctx, "GET", location_list_url) + + # this is required to fool the static analyzer. The else statement will only run if an exception + # is thrown, but flake8 will complain that e is undefined if we don't also define it here. + error = None + break + except CLIError as e: + error = e + else: + # This will run if the above for loop was not broken out of. This means all three requests failed + raise error + json_response = json.loads(r.text) + for region_data in json_response["value"]: + region_names_to_id[region_data["displayName"]] = region_data["name"] + + # check if region supports DCRs and DCR-A + for _ in range(3): + try: + feature_check_url = f"https://management.azure.com/subscriptions/{subscription_id}/providers/Microsoft.Insights?api-version=2020-10-01" + r = send_raw_request(cmd.cli_ctx, "GET", feature_check_url) + error = None + break + except CLIError as e: + error = e + else: + raise error + json_response = json.loads(r.text) + for resource in json_response["resourceTypes"]: + region_ids = map(lambda x: region_names_to_id[x], resource["locations"]) # map is lazy, so doing this for every region isn't slow + if resource["resourceType"].lower() == "datacollectionrules" and location not in region_ids: + raise ClientRequestError(f'Data Collection Rules are not supported for LA workspace region {location}') + elif resource["resourceType"].lower() == "datacollectionruleassociations" and cluster_region not in region_ids: + raise ClientRequestError(f'Data Collection Rule Associations are not supported for cluster region {location}') + + # create the DCR + dcr_creation_body = json.dumps({"location": location, + "properties": { + "dataSources": { + "extensions": [ + { + "name": "ContainerInsightsExtension", + "streams": [ + "Microsoft-Perf", + "Microsoft-ContainerInventory", + "Microsoft-ContainerLog", + "Microsoft-ContainerLogV2", + "Microsoft-ContainerNodeInventory", + "Microsoft-KubeEvents", + "Microsoft-KubeHealth", + "Microsoft-KubeMonAgentEvents", + "Microsoft-KubeNodeInventory", + "Microsoft-KubePodInventory", + "Microsoft-KubePVInventory", + "Microsoft-KubeServices", + "Microsoft-InsightsMetrics" + ], + "extensionName": "ContainerInsights" + } + ] + }, + "dataFlows": [ + { + "streams": [ + "Microsoft-Perf", + "Microsoft-ContainerInventory", + "Microsoft-ContainerLog", + "Microsoft-ContainerLogV2", + "Microsoft-ContainerNodeInventory", + "Microsoft-KubeEvents", + "Microsoft-KubeHealth", + "Microsoft-KubeMonAgentEvents", + "Microsoft-KubeNodeInventory", + "Microsoft-KubePodInventory", + "Microsoft-KubePVInventory", + "Microsoft-KubeServices", + "Microsoft-InsightsMetrics" + ], + "destinations": [ + "la-workspace" + ] + } + ], + "destinations": { + "logAnalytics": [ + { + "workspaceResourceId": workspace_resource_id, + "name": "la-workspace" + } + ] + } + }}) + dcr_url = f"https://management.azure.com/{dcr_resource_id}?api-version=2019-11-01-preview" + for _ in range(3): + try: + send_raw_request(cmd.cli_ctx, "PUT", dcr_url, body=dcr_creation_body) + error = None + break + except CLIError as e: + error = e + else: + raise error + + if create_dcra: + # only create or delete the association between the DCR and cluster + association_body = json.dumps({"location": cluster_region, + "properties": { + "dataCollectionRuleId": dcr_resource_id, + "description": "routes monitoring data to a Log Analytics workspace" + }}) + association_url = f"https://management.azure.com/{cluster_resource_id}/providers/Microsoft.Insights/dataCollectionRuleAssociations/send-to-{workspace_name}?api-version=2019-11-01-preview" + for _ in range(3): + try: + send_raw_request(cmd.cli_ctx, "PUT" if not remove_monitoring else "DELETE", association_url, body=association_body) + error = None + break + except CLIError as e: + error = e + else: + raise error + + else: + # legacy auth with LA workspace solution + unix_time_in_millis = int( + (datetime.datetime.utcnow() - datetime.datetime.utcfromtimestamp(0)).total_seconds() * 1000.0) + + solution_deployment_name = 'ContainerInsights-{}'.format( + unix_time_in_millis) + + # pylint: disable=line-too-long + template = { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "workspaceResourceId": { + "type": "string", + "metadata": { + "description": "Azure Monitor Log Analytics Resource ID" + } + }, + "workspaceRegion": { + "type": "string", + "metadata": { + "description": "Azure Monitor Log Analytics workspace region" + } + }, + "solutionDeploymentName": { + "type": "string", + "metadata": { + "description": "Name of the solution deployment" + } } }, - "solutionDeploymentName": { - "type": "string", - "metadata": { - "description": "Name of the solution deployment" - } - } - }, - "resources": [ - { - "type": "Microsoft.Resources/deployments", - "name": "[parameters('solutionDeploymentName')]", - "apiVersion": "2017-05-10", - "subscriptionId": "[split(parameters('workspaceResourceId'),'/')[2]]", - "resourceGroup": "[split(parameters('workspaceResourceId'),'/')[4]]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": {}, - "resources": [ - { - "apiVersion": "2015-11-01-preview", - "type": "Microsoft.OperationsManagement/solutions", - "location": "[parameters('workspaceRegion')]", - "name": "[Concat('ContainerInsights', '(', split(parameters('workspaceResourceId'),'/')[8], ')')]", - "properties": { - "workspaceResourceId": "[parameters('workspaceResourceId')]" - }, - "plan": { + "resources": [ + { + "type": "Microsoft.Resources/deployments", + "name": "[parameters('solutionDeploymentName')]", + "apiVersion": "2017-05-10", + "subscriptionId": "[split(parameters('workspaceResourceId'),'/')[2]]", + "resourceGroup": "[split(parameters('workspaceResourceId'),'/')[4]]", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": {}, + "variables": {}, + "resources": [ + { + "apiVersion": "2015-11-01-preview", + "type": "Microsoft.OperationsManagement/solutions", + "location": "[parameters('workspaceRegion')]", "name": "[Concat('ContainerInsights', '(', split(parameters('workspaceResourceId'),'/')[8], ')')]", - "product": "[Concat('OMSGallery/', 'ContainerInsights')]", - "promotionCode": "", - "publisher": "Microsoft" + "properties": { + "workspaceResourceId": "[parameters('workspaceResourceId')]" + }, + "plan": { + "name": "[Concat('ContainerInsights', '(', split(parameters('workspaceResourceId'),'/')[8], ')')]", + "product": "[Concat('OMSGallery/', 'ContainerInsights')]", + "promotionCode": "", + "publisher": "Microsoft" + } } - } - ] - }, - "parameters": {} + ] + }, + "parameters": {} + } } - } - ] - } + ] + } - params = { - "workspaceResourceId": { - "value": workspace_resource_id - }, - "workspaceRegion": { - "value": location - }, - "solutionDeploymentName": { - "value": solution_deployment_name + params = { + "workspaceResourceId": { + "value": workspace_resource_id + }, + "workspaceRegion": { + "value": location + }, + "solutionDeploymentName": { + "value": solution_deployment_name + } } - } - deployment_name = 'aks-monitoring-{}'.format(unix_time_in_millis) - # publish the Container Insights solution to the Log Analytics workspace - return _invoke_deployment(cmd, resource_group, deployment_name, template, params, - validate=False, no_wait=False, subscription_id=subscription_id) + deployment_name = 'aks-monitoring-{}'.format(unix_time_in_millis) + # publish the Container Insights solution to the Log Analytics workspace + return _invoke_deployment(cmd, resource_group, deployment_name, template, params, + validate=False, no_wait=False, subscription_id=subscription_id) def _ensure_aks_service_principal(cli_ctx, @@ -3098,7 +3279,7 @@ def aks_agentpool_add(cmd, # pylint: disable=unused-argument,too-many-local agent_pool.linux_os_config = _get_linux_os_config(linux_os_config) headers = get_aks_custom_headers(aks_custom_headers) - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, nodepool_name, agent_pool, custom_headers=headers) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, nodepool_name, agent_pool, headers=headers) def aks_agentpool_scale(cmd, # pylint: disable=unused-argument @@ -3116,7 +3297,7 @@ def aks_agentpool_scale(cmd, # pylint: disable=unused-argument raise CLIError( "The new node count is the same as the current node count.") instance.count = new_node_count # pylint: disable=no-member - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, nodepool_name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, nodepool_name, instance) def aks_agentpool_upgrade(cmd, # pylint: disable=unused-argument @@ -3148,7 +3329,7 @@ def aks_agentpool_upgrade(cmd, # pylint: disable=unused-argument if max_surge: instance.upgrade_settings.max_surge = max_surge - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, nodepool_name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, nodepool_name, instance) def aks_agentpool_get_upgrade_profile(cmd, # pylint: disable=unused-argument @@ -3230,7 +3411,7 @@ def aks_agentpool_update(cmd, # pylint: disable=unused-argument if mode is not None: instance.mode = mode - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, nodepool_name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, nodepool_name, instance) def aks_agentpool_delete(cmd, # pylint: disable=unused-argument @@ -3250,13 +3431,34 @@ def aks_agentpool_delete(cmd, # pylint: disable=unused-argument raise CLIError("Node pool {} doesnt exist, " "use 'aks nodepool list' to get current node pool list".format(nodepool_name)) - return sdk_no_wait(no_wait, client.delete, resource_group_name, cluster_name, nodepool_name) + return sdk_no_wait(no_wait, client.begin_delete, resource_group_name, cluster_name, nodepool_name) def aks_disable_addons(cmd, client, resource_group_name, name, addons, no_wait=False): instance = client.get(resource_group_name, name) subscription_id = get_subscription_id(cmd.cli_ctx) + try: + if addons == "monitoring" and CONST_MONITORING_ADDON_NAME in instance.addon_profiles and \ + instance.addon_profiles[CONST_MONITORING_ADDON_NAME].enabled and \ + CONST_MONITORING_USING_AAD_MSI_AUTH in instance.addon_profiles[CONST_MONITORING_ADDON_NAME].config and \ + str(instance.addon_profiles[CONST_MONITORING_ADDON_NAME].config[CONST_MONITORING_USING_AAD_MSI_AUTH]).lower() == 'true': + # remove the DCR association because otherwise the DCR can't be deleted + _ensure_container_insights_for_monitoring( + cmd, + instance.addon_profiles[CONST_MONITORING_ADDON_NAME], + subscription_id, + resource_group_name, + name, + instance.location, + remove_monitoring=True, + aad_route=True, + create_dcr=False, + create_dcra=True + ) + except TypeError: + pass + instance = _update_addons( cmd, instance, @@ -3269,22 +3471,33 @@ def aks_disable_addons(cmd, client, resource_group_name, name, addons, no_wait=F ) # send the managed cluster representation to update the addon profiles - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, name, instance) def aks_enable_addons(cmd, client, resource_group_name, name, addons, workspace_resource_id=None, subnet_name=None, appgw_name=None, appgw_subnet_prefix=None, appgw_subnet_cidr=None, appgw_id=None, appgw_subnet_id=None, - appgw_watch_namespace=None, enable_sgxquotehelper=False, enable_secret_rotation=False, no_wait=False): + appgw_watch_namespace=None, enable_sgxquotehelper=False, enable_secret_rotation=False, no_wait=False, enable_msi_auth_for_monitoring=False): + instance = client.get(resource_group_name, name) + msi_auth = True if instance.service_principal_profile.client_id == "msi" else False # this is overwritten by _update_addons(), so the value needs to be recorded here + subscription_id = get_subscription_id(cmd.cli_ctx) instance = _update_addons(cmd, instance, subscription_id, resource_group_name, name, addons, enable=True, - workspace_resource_id=workspace_resource_id, subnet_name=subnet_name, + workspace_resource_id=workspace_resource_id, enable_msi_auth_for_monitoring=enable_msi_auth_for_monitoring, subnet_name=subnet_name, appgw_name=appgw_name, appgw_subnet_prefix=appgw_subnet_prefix, appgw_subnet_cidr=appgw_subnet_cidr, appgw_id=appgw_id, appgw_subnet_id=appgw_subnet_id, appgw_watch_namespace=appgw_watch_namespace, enable_sgxquotehelper=enable_sgxquotehelper, enable_secret_rotation=enable_secret_rotation, no_wait=no_wait) if CONST_MONITORING_ADDON_NAME in instance.addon_profiles and instance.addon_profiles[CONST_MONITORING_ADDON_NAME].enabled: - _ensure_container_insights_for_monitoring( - cmd, instance.addon_profiles[CONST_MONITORING_ADDON_NAME]) + if CONST_MONITORING_USING_AAD_MSI_AUTH in instance.addon_profiles[CONST_MONITORING_ADDON_NAME].config and \ + str(instance.addon_profiles[CONST_MONITORING_ADDON_NAME].config[CONST_MONITORING_USING_AAD_MSI_AUTH]).lower() == 'true': + if not msi_auth: + raise ArgumentUsageError("--enable-msi-auth-for-monitoring can not be used on clusters with service principal auth.") + else: + # create a Data Collection Rule (DCR) and associate it with the cluster + _ensure_container_insights_for_monitoring(cmd, instance.addon_profiles[CONST_MONITORING_ADDON_NAME], subscription_id, resource_group_name, name, instance.location, aad_route=True, create_dcr=True, create_dcra=True) + else: + # monitoring addon will use legacy path + _ensure_container_insights_for_monitoring(cmd, instance.addon_profiles[CONST_MONITORING_ADDON_NAME], subscription_id, resource_group_name, name, instance.location, aad_route=False) monitoring = CONST_MONITORING_ADDON_NAME in instance.addon_profiles and instance.addon_profiles[ CONST_MONITORING_ADDON_NAME].enabled @@ -3300,7 +3513,7 @@ def aks_enable_addons(cmd, client, resource_group_name, name, addons, workspace_ if need_post_creation_role_assignment: # adding a wait here since we rely on the result for role assignment result = LongRunningOperation(cmd.cli_ctx)( - client.create_or_update(resource_group_name, name, instance)) + client.begin_create_or_update(resource_group_name, name, instance)) cloud_name = cmd.cli_ctx.cloud.name # mdm metrics supported only in Azure Public cloud so add the role assignment only in this cloud if monitoring and cloud_name.lower() == 'azurecloud': @@ -3325,13 +3538,13 @@ def aks_enable_addons(cmd, client, resource_group_name, name, addons, workspace_ # we don't need to handle it in client side in this case. else: - result = sdk_no_wait(no_wait, client.create_or_update, + result = sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, name, instance) return result def aks_rotate_certs(cmd, client, resource_group_name, name, no_wait=True): # pylint: disable=unused-argument - return sdk_no_wait(no_wait, client.rotate_cluster_certificates, resource_group_name, name) + return sdk_no_wait(no_wait, client.begin_rotate_cluster_certificates, resource_group_name, name) def _update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements @@ -3342,6 +3555,7 @@ def _update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements addons, enable, workspace_resource_id=None, + enable_msi_auth_for_monitoring=False, subnet_name=None, appgw_name=None, appgw_subnet_prefix=None, @@ -3392,8 +3606,8 @@ def _update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements resource_group_name) workspace_resource_id = _sanitize_loganalytics_ws_resource_id(workspace_resource_id) - addon_profile.config = { - logAnalyticsConstName: workspace_resource_id} + addon_profile.config = {logAnalyticsConstName: workspace_resource_id} + addon_profile.config[CONST_MONITORING_USING_AAD_MSI_AUTH] = enable_msi_auth_for_monitoring elif addon == (CONST_VIRTUAL_NODE_ADDON_NAME + os_type): if addon_profile.enabled: raise CLIError('The virtual-node addon is already enabled for this managed cluster.\n' @@ -3797,11 +4011,11 @@ def _put_managed_cluster_ensuring_permission( need_grant_vnet_permission_to_cluster_identity) if need_post_creation_role_assignment: # adding a wait here since we rely on the result for role assignment - cluster = LongRunningOperation(cmd.cli_ctx)(client.create_or_update( + cluster = LongRunningOperation(cmd.cli_ctx)(client.begin_create_or_update( resource_group_name=resource_group_name, resource_name=name, parameters=managed_cluster, - custom_headers=headers)) + headers=headers)) cloud_name = cmd.cli_ctx.cloud.name # add cluster spn/msi Monitoring Metrics Publisher role assignment to publish metrics to MDM # mdm metrics is supported only in azure public cloud, so add the role assignment only in this cloud @@ -3840,11 +4054,11 @@ def _put_managed_cluster_ensuring_permission( acr_name_or_id=attach_acr, subscription_id=subscription_id) else: - cluster = sdk_no_wait(no_wait, client.create_or_update, + cluster = sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name=resource_group_name, resource_name=name, parameters=managed_cluster, - custom_headers=headers) + headers=headers) return cluster @@ -4083,7 +4297,7 @@ def aks_pod_identity_add(cmd, client, resource_group_name, cluster_name, ) # send the managed cluster represeentation to update the pod identity addon - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, instance) def aks_pod_identity_delete(cmd, client, resource_group_name, cluster_name, @@ -4107,7 +4321,7 @@ def aks_pod_identity_delete(cmd, client, resource_group_name, cluster_name, ) # send the managed cluster represeentation to update the pod identity addon - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, instance) def aks_pod_identity_list(cmd, client, resource_group_name, cluster_name): # pylint: disable=unused-argument @@ -4134,7 +4348,7 @@ def aks_pod_identity_exception_add(cmd, client, resource_group_name, cluster_nam ) # send the managed cluster represeentation to update the pod identity addon - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, instance) def aks_pod_identity_exception_delete(cmd, client, resource_group_name, cluster_name, @@ -4157,7 +4371,7 @@ def aks_pod_identity_exception_delete(cmd, client, resource_group_name, cluster_ ) # send the managed cluster represeentation to update the pod identity addon - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, instance) def aks_pod_identity_exception_update(cmd, client, resource_group_name, cluster_name, @@ -4188,7 +4402,7 @@ def aks_pod_identity_exception_update(cmd, client, resource_group_name, cluster_ ) # send the managed cluster represeentation to update the pod identity addon - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, instance) + return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, instance) def aks_pod_identity_exception_list(cmd, client, resource_group_name, cluster_name): diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index 6ad219a811a..876ba3418c3 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py @@ -62,7 +62,7 @@ def test_aks_create_and_update_with_managed_aad(self, resource_group, resource_g self.check('provisioningState', 'Succeeded'), self.check('aadProfile.managed', True), self.check( - 'aadProfile.adminGroupObjectIds[0]', '00000000-0000-0000-0000-000000000001') + 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000001') ]) update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ @@ -72,7 +72,7 @@ def test_aks_create_and_update_with_managed_aad(self, resource_group, resource_g self.check('provisioningState', 'Succeeded'), self.check('aadProfile.managed', True), self.check( - 'aadProfile.adminGroupObjectIds[0]', '00000000-0000-0000-0000-000000000002'), + 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000002'), self.check('aadProfile.tenantId', '00000000-0000-0000-0000-000000000003') ]) @@ -114,7 +114,7 @@ def test_aks_create_aadv1_and_update_with_managed_aad(self, resource_group, reso self.check('provisioningState', 'Succeeded'), self.check('aadProfile.managed', True), self.check( - 'aadProfile.adminGroupObjectIds[0]', '00000000-0000-0000-0000-000000000003'), + 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000003'), self.check('aadProfile.tenantId', '00000000-0000-0000-0000-000000000004') ]) @@ -146,7 +146,7 @@ def test_aks_create_nonaad_and_update_with_managed_aad(self, resource_group, res self.check('provisioningState', 'Succeeded'), self.check('aadProfile.managed', True), self.check( - 'aadProfile.adminGroupObjectIds[0]', '00000000-0000-0000-0000-000000000001'), + 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000001'), self.check('aadProfile.tenantId', '00000000-0000-0000-0000-000000000002') ]) @@ -169,7 +169,7 @@ def test_aks_create_and_update_with_managed_aad_enable_azure_rbac(self, resource self.check('provisioningState', 'Succeeded'), self.check('aadProfile.managed', True), self.check( - 'aadProfile.adminGroupObjectIds[0]', '00000000-0000-0000-0000-000000000001') + 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000001') ]) update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ @@ -1149,6 +1149,197 @@ def test_aks_update_to_msi_cluster_with_addons(self, resource_group, resource_gr self.cmd( 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_monitoring_aad_auth_msi(self, resource_group, resource_group_location,): + aks_name = self.create_random_name('cliakstest', 16) + self.create_new_cluster_with_monitoring_aad_auth(resource_group, resource_group_location, aks_name, user_assigned_identity=False) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_monitoring_aad_auth_uai(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.create_new_cluster_with_monitoring_aad_auth(resource_group, resource_group_location, aks_name, user_assigned_identity=True) + + def create_new_cluster_with_monitoring_aad_auth(self, resource_group, resource_group_location, aks_name, user_assigned_identity=False): + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'location': resource_group_location, + }) + + if user_assigned_identity: + uai_cmd = f'identity create -g {resource_group} -n {aks_name}_uai' + resp = self.cmd(uai_cmd).get_output_in_json() + identity_id = resp["id"] + print("********************") + print(f"identity_id: {identity_id}") + print("********************") + + # create + create_cmd = f'aks create --resource-group={resource_group} --name={aks_name} --location={resource_group_location} ' \ + '--generate-ssh-keys --enable-managed-identity ' \ + '--enable-addons monitoring ' \ + '--enable-msi-auth-for-monitoring ' \ + '--node-count 1 ' + create_cmd += f'--assign-identity {identity_id}' if user_assigned_identity else '' + + response = self.cmd(create_cmd, checks=[ + self.check('addonProfiles.omsagent.enabled', True), + self.check('addonProfiles.omsagent.config.useAADAuth', 'True') + ]).get_output_in_json() + + cluster_resource_id = response["id"] + subscription = cluster_resource_id.split("/")[2] + workspace_resource_id = response["addonProfiles"]["omsagent"]["config"]["logAnalyticsWorkspaceResourceID"] + workspace_name = workspace_resource_id.split("/")[-1] + workspace_resource_group = workspace_resource_id.split("/")[4] + + # check that the DCR was created + dataCollectionRuleName = f"DCR-{workspace_name}" + dcr_resource_id = f"/subscriptions/{subscription}/resourceGroups/{workspace_resource_group}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}" + get_cmd = f'rest --method get --url https://management.azure.com{dcr_resource_id}?api-version=2019-11-01-preview' + self.cmd(get_cmd, checks=[ + self.check('properties.destinations.logAnalytics[0].workspaceResourceId', f'{workspace_resource_id}') + ]) + + # check that the DCR-A was created + dcra_resource_id = f"{cluster_resource_id}/providers/Microsoft.Insights/dataCollectionRuleAssociations/send-to-{workspace_name}" + get_cmd = f'rest --method get --url https://management.azure.com{dcra_resource_id}?api-version=2019-11-01-preview' + self.cmd(get_cmd, checks=[ + self.check('properties.dataCollectionRuleId', f'{dcr_resource_id}') + ]) + + # make sure monitoring can be smoothly disabled + self.cmd(f'aks disable-addons -a monitoring -g={resource_group} -n={aks_name}') + + # delete + self.cmd(f'aks delete -g {resource_group} -n {aks_name} --yes --no-wait', checks=[self.is_empty()]) + + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_enable_monitoring_with_aad_auth_msi(self, resource_group, resource_group_location,): + aks_name = self.create_random_name('cliakstest', 16) + self.enable_monitoring_existing_cluster_aad_atuh(resource_group, resource_group_location, aks_name, user_assigned_identity=False) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_enable_monitoring_with_aad_auth_uai(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.enable_monitoring_existing_cluster_aad_atuh(resource_group, resource_group_location, aks_name, user_assigned_identity=True) + + def enable_monitoring_existing_cluster_aad_atuh(self, resource_group, resource_group_location, aks_name, user_assigned_identity=False): + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'location': resource_group_location, + }) + + if user_assigned_identity: + uai_cmd = f'identity create -g {resource_group} -n {aks_name}_uai' + resp = self.cmd(uai_cmd).get_output_in_json() + identity_id = resp["id"] + print("********************") + print(f"identity_id: {identity_id}") + print("********************") + + # create + create_cmd = f'aks create --resource-group={resource_group} --name={aks_name} --location={resource_group_location} ' \ + '--generate-ssh-keys --enable-managed-identity ' \ + '--node-count 1 ' + create_cmd += f'--assign-identity {identity_id}' if user_assigned_identity else '' + self.cmd(create_cmd) + + enable_monitoring_cmd = f'aks enable-addons -a monitoring --resource-group={resource_group} --name={aks_name} ' \ + '--enable-msi-auth-for-monitoring ' + + response = self.cmd(enable_monitoring_cmd, checks=[ + self.check('addonProfiles.omsagent.enabled', True), + self.check('addonProfiles.omsagent.config.useAADAuth', 'True') + ]).get_output_in_json() + + cluster_resource_id = response["id"] + subscription = cluster_resource_id.split("/")[2] + workspace_resource_id = response["addonProfiles"]["omsagent"]["config"]["logAnalyticsWorkspaceResourceID"] + workspace_name = workspace_resource_id.split("/")[-1] + workspace_resource_group = workspace_resource_id.split("/")[4] + + # check that the DCR was created + dataCollectionRuleName = f"DCR-{workspace_name}" + dcr_resource_id = f"/subscriptions/{subscription}/resourceGroups/{workspace_resource_group}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}" + get_cmd = f'rest --method get --url https://management.azure.com{dcr_resource_id}?api-version=2019-11-01-preview' + self.cmd(get_cmd, checks=[ + self.check('properties.destinations.logAnalytics[0].workspaceResourceId', f'{workspace_resource_id}') + ]) + + # check that the DCR-A was created + dcra_resource_id = f"{cluster_resource_id}/providers/Microsoft.Insights/dataCollectionRuleAssociations/send-to-{workspace_name}" + get_cmd = f'rest --method get --url https://management.azure.com{dcra_resource_id}?api-version=2019-11-01-preview' + self.cmd(get_cmd, checks=[ + self.check('properties.dataCollectionRuleId', f'{dcr_resource_id}') + ]) + + # make sure monitoring can be smoothly disabled + self.cmd(f'aks disable-addons -a monitoring -g={resource_group} -n={aks_name}') + + # delete + self.cmd(f'aks delete -g {resource_group} -n {aks_name} --yes --no-wait', checks=[self.is_empty()]) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_monitoring_legacy_auth(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'location': resource_group_location, + }) + + # create + create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ + '--generate-ssh-keys --enable-managed-identity ' \ + '--enable-addons monitoring ' \ + '--node-count 1 ' + response = self.cmd(create_cmd, checks=[ + self.check('addonProfiles.omsagent.enabled', True), + self.exists('addonProfiles.omsagent.config.logAnalyticsWorkspaceResourceID'), + self.check('addonProfiles.omsagent.config.useAADAuth', 'False') + ]).get_output_in_json() + + # make sure a DCR was not created + + cluster_resource_id = response["id"] + subscription = cluster_resource_id.split("/")[2] + workspace_resource_id = response["addonProfiles"]["omsagent"]["config"]["logAnalyticsWorkspaceResourceID"] + workspace_name = workspace_resource_id.split("/")[-1] + workspace_resource_group = workspace_resource_id.split("/")[4] + + try: + # check that the DCR was created + dataCollectionRuleName = f"DCR-{workspace_name}" + dcr_resource_id = f"/subscriptions/{subscription}/resourceGroups/{workspace_resource_group}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}" + get_cmd = f'rest --method get --url https://management.azure.com{dcr_resource_id}?api-version=2019-11-01-preview' + self.cmd(get_cmd, checks=[ + self.check('properties.destinations.logAnalytics[0].workspaceResourceId', f'{workspace_resource_id}') + ]) + + assert False + except Exception as err: + pass # this is expected + + + # make sure monitoring can be smoothly disabled + self.cmd(f'aks disable-addons -a monitoring -g={resource_group} -n={aks_name}') + + # delete + self.cmd(f'aks delete -g {resource_group} -n {aks_name} --yes --no-wait', checks=[self.is_empty()]) + @AllowLargeResponse() @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') def test_aks_create_with_auto_upgrade_channel(self, resource_group, resource_group_location): @@ -1286,10 +1477,11 @@ def test_aks_create_fqdn_subdomain(self, resource_group, resource_group_location 'name': aks_name, 'identity_name': identity_name, 'subdomain_name': subdomain_name, + 'location': resource_group_location }) # create private dns zone - create_private_dns_zone = 'network private-dns zone create --resource-group={resource_group} --name="privatelink.westus2.azmk8s.io"' + create_private_dns_zone = 'network private-dns zone create --resource-group={resource_group} --name="privatelink.{location}.azmk8s.io"' zone = self.cmd(create_private_dns_zone, checks=[ self.check('provisioningState', 'Succeeded') ]).get_output_in_json() diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_loadbalancer.py b/src/aks-preview/azext_aks_preview/tests/latest/test_loadbalancer.py index 8c5932cf8ca..9850a3923e0 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_loadbalancer.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_loadbalancer.py @@ -21,10 +21,12 @@ def test_configure_load_balancer_profile(self): idle_timeout = 3600 profile = ManagedClusterLoadBalancerProfile() - profile.managed_outbound_ips = ManagedClusterLoadBalancerProfileManagedOutboundIPs( + # ips -> i_ps due to track 2 naming issue + profile.managed_outbound_i_ps = ManagedClusterLoadBalancerProfileManagedOutboundIPs( count=2 ) - profile.outbound_ips = ManagedClusterLoadBalancerProfileOutboundIPs( + # ips -> i_ps due to track 2 naming issue + profile.outbound_i_ps = ManagedClusterLoadBalancerProfileOutboundIPs( public_ips="public_ips" ) profile.outbound_ip_prefixes = ManagedClusterLoadBalancerProfileOutboundIPPrefixes( @@ -33,8 +35,10 @@ def test_configure_load_balancer_profile(self): p = loadbalancer.configure_load_balancer_profile(managed_outbound_ip_count, outbound_ips, outbound_ip_prefixes, outbound_ports, idle_timeout, profile) - self.assertIsNotNone(p.managed_outbound_ips) - self.assertIsNone(p.outbound_ips) + # ips -> i_ps due to track 2 naming issue + self.assertIsNotNone(p.managed_outbound_i_ps) + # ips -> i_ps due to track 2 naming issue + self.assertIsNone(p.outbound_i_ps) self.assertIsNone(p.outbound_ip_prefixes) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/__init__.py deleted file mode 100644 index 9854e4f7645..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_service_client import ContainerServiceClient -from .version import VERSION - -__all__ = ['ContainerServiceClient'] - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/container_service_client.py deleted file mode 100644 index 5ff9597bf7a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/container_service_client.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -# from azext_aks_preview.vendored_sdks.msrest.service_client import SDKClient -# from azext_aks_preview.vendored_sdks.msrest import Serializer, Deserializer -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.container_services_operations import ContainerServicesOperations -from .operations.operations import Operations -from .operations.managed_clusters_operations import ManagedClustersOperations -from . import models - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar container_services: ContainerServices operations - :vartype container_services: azure.mgmt.containerservice.operations.ContainerServicesOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.operations.ManagedClustersOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.container_services = ContainerServicesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/__init__.py deleted file mode 100644 index f188b0d88cf..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/__init__.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from .resource_py3 import Resource - from .container_service_custom_profile_py3 import ContainerServiceCustomProfile - from .key_vault_secret_ref_py3 import KeyVaultSecretRef - from .container_service_service_principal_profile_py3 import ContainerServiceServicePrincipalProfile - from .container_service_orchestrator_profile_py3 import ContainerServiceOrchestratorProfile - from .container_service_master_profile_py3 import ContainerServiceMasterProfile - from .container_service_agent_pool_profile_py3 import ContainerServiceAgentPoolProfile - from .container_service_windows_profile_py3 import ContainerServiceWindowsProfile - from .container_service_ssh_public_key_py3 import ContainerServiceSshPublicKey - from .container_service_ssh_configuration_py3 import ContainerServiceSshConfiguration - from .container_service_linux_profile_py3 import ContainerServiceLinuxProfile - from .container_service_vm_diagnostics_py3 import ContainerServiceVMDiagnostics - from .container_service_diagnostics_profile_py3 import ContainerServiceDiagnosticsProfile - from .container_service_py3 import ContainerService - from .operation_value_py3 import OperationValue - from .tags_object_py3 import TagsObject - from .managed_cluster_service_principal_profile_py3 import ManagedClusterServicePrincipalProfile - from .managed_cluster_agent_pool_profile_py3 import ManagedClusterAgentPoolProfile - from .container_service_network_profile_py3 import ContainerServiceNetworkProfile - from .managed_cluster_addon_profile_py3 import ManagedClusterAddonProfile - from .managed_cluster_aad_profile_py3 import ManagedClusterAADProfile - from .managed_cluster_py3 import ManagedCluster - from .orchestrator_profile_py3 import OrchestratorProfile - from .managed_cluster_access_profile_py3 import ManagedClusterAccessProfile - from .managed_cluster_pool_upgrade_profile_py3 import ManagedClusterPoolUpgradeProfile - from .managed_cluster_upgrade_profile_py3 import ManagedClusterUpgradeProfile - from .credential_result_py3 import CredentialResult - from .credential_results_py3 import CredentialResults - from .orchestrator_version_profile_py3 import OrchestratorVersionProfile - from .orchestrator_version_profile_list_result_py3 import OrchestratorVersionProfileListResult -except (SyntaxError, ImportError): - from .resource import Resource - from .container_service_custom_profile import ContainerServiceCustomProfile - from .key_vault_secret_ref import KeyVaultSecretRef - from .container_service_service_principal_profile import ContainerServiceServicePrincipalProfile - from .container_service_orchestrator_profile import ContainerServiceOrchestratorProfile - from .container_service_master_profile import ContainerServiceMasterProfile - from .container_service_agent_pool_profile import ContainerServiceAgentPoolProfile - from .container_service_windows_profile import ContainerServiceWindowsProfile - from .container_service_ssh_public_key import ContainerServiceSshPublicKey - from .container_service_ssh_configuration import ContainerServiceSshConfiguration - from .container_service_linux_profile import ContainerServiceLinuxProfile - from .container_service_vm_diagnostics import ContainerServiceVMDiagnostics - from .container_service_diagnostics_profile import ContainerServiceDiagnosticsProfile - from .container_service import ContainerService - from .operation_value import OperationValue - from .tags_object import TagsObject - from .managed_cluster_service_principal_profile import ManagedClusterServicePrincipalProfile - from .managed_cluster_agent_pool_profile import ManagedClusterAgentPoolProfile - from .container_service_network_profile import ContainerServiceNetworkProfile - from .managed_cluster_addon_profile import ManagedClusterAddonProfile - from .managed_cluster_aad_profile import ManagedClusterAADProfile - from .managed_cluster import ManagedCluster - from .orchestrator_profile import OrchestratorProfile - from .managed_cluster_access_profile import ManagedClusterAccessProfile - from .managed_cluster_pool_upgrade_profile import ManagedClusterPoolUpgradeProfile - from .managed_cluster_upgrade_profile import ManagedClusterUpgradeProfile - from .credential_result import CredentialResult - from .credential_results import CredentialResults - from .orchestrator_version_profile import OrchestratorVersionProfile - from .orchestrator_version_profile_list_result import OrchestratorVersionProfileListResult -from .container_service_paged import ContainerServicePaged -from .operation_value_paged import OperationValuePaged -from .managed_cluster_paged import ManagedClusterPaged -from .container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - ContainerServiceOrchestratorTypes, - OSType, - NetworkPlugin, - NetworkPolicy, -) - -__all__ = [ - 'Resource', - 'ContainerServiceCustomProfile', - 'KeyVaultSecretRef', - 'ContainerServiceServicePrincipalProfile', - 'ContainerServiceOrchestratorProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceAgentPoolProfile', - 'ContainerServiceWindowsProfile', - 'ContainerServiceSshPublicKey', - 'ContainerServiceSshConfiguration', - 'ContainerServiceLinuxProfile', - 'ContainerServiceVMDiagnostics', - 'ContainerServiceDiagnosticsProfile', - 'ContainerService', - 'OperationValue', - 'TagsObject', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterAgentPoolProfile', - 'ContainerServiceNetworkProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAADProfile', - 'ManagedCluster', - 'OrchestratorProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterUpgradeProfile', - 'CredentialResult', - 'CredentialResults', - 'OrchestratorVersionProfile', - 'OrchestratorVersionProfileListResult', - 'ContainerServicePaged', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'ContainerServiceOrchestratorTypes', - 'OSType', - 'NetworkPlugin', - 'NetworkPolicy', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service.py deleted file mode 100644 index ffc12f82ffb..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ContainerService(Resource): - """Container service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param orchestrator_profile: Required. Profile for the container service - orchestrator. - :type orchestrator_profile: - ~azure.mgmt.containerservice.models.ContainerServiceOrchestratorProfile - :param custom_profile: Properties to configure a custom container service - cluster. - :type custom_profile: - ~azure.mgmt.containerservice.models.ContainerServiceCustomProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. Exact one of - secret or keyVaultSecretRef need to be specified. - :type service_principal_profile: - ~azure.mgmt.containerservice.models.ContainerServiceServicePrincipalProfile - :param master_profile: Required. Profile for the container service master. - :type master_profile: - ~azure.mgmt.containerservice.models.ContainerServiceMasterProfile - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.models.ContainerServiceAgentPoolProfile] - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.models.ContainerServiceWindowsProfile - :param linux_profile: Required. Profile for Linux VMs in the container - service cluster. - :type linux_profile: - ~azure.mgmt.containerservice.models.ContainerServiceLinuxProfile - :param diagnostics_profile: Profile for diagnostics in the container - service cluster. - :type diagnostics_profile: - ~azure.mgmt.containerservice.models.ContainerServiceDiagnosticsProfile - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'orchestrator_profile': {'required': True}, - 'master_profile': {'required': True}, - 'linux_profile': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'orchestrator_profile': {'key': 'properties.orchestratorProfile', 'type': 'ContainerServiceOrchestratorProfile'}, - 'custom_profile': {'key': 'properties.customProfile', 'type': 'ContainerServiceCustomProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ContainerServiceServicePrincipalProfile'}, - 'master_profile': {'key': 'properties.masterProfile', 'type': 'ContainerServiceMasterProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ContainerServiceAgentPoolProfile]'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ContainerServiceWindowsProfile'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'ContainerServiceDiagnosticsProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerService, self).__init__(**kwargs) - self.provisioning_state = None - self.orchestrator_profile = kwargs.get('orchestrator_profile', None) - self.custom_profile = kwargs.get('custom_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.master_profile = kwargs.get('master_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.diagnostics_profile = kwargs.get('diagnostics_profile', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_agent_pool_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_agent_pool_profile.py deleted file mode 100644 index e0d5dd777aa..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_agent_pool_profile.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceAgentPoolProfile(Model): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 1 to 100 (inclusive). The default value is - 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param dns_prefix: DNS prefix to be used to create the FQDN for the agent - pool. - :type dns_prefix: str - :ivar fqdn: FDQN for the agent pool. - :vartype fqdn: str - :param ports: Ports number array used to expose on this agent pool. The - default opened ports are different based on your choice of orchestrator. - :type ports: list[int] - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes - :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet - identifier. - :type vnet_subnet_id: str - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or ~azure.mgmt.containerservice.models.OSType - """ - - _validation = { - 'name': {'required': True}, - 'count': {'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[int]'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.ports = kwargs.get('ports', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.os_type = kwargs.get('os_type', "Linux") diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_agent_pool_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_agent_pool_profile_py3.py deleted file mode 100644 index dcb5bd830a9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_agent_pool_profile_py3.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceAgentPoolProfile(Model): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 1 to 100 (inclusive). The default value is - 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param dns_prefix: DNS prefix to be used to create the FQDN for the agent - pool. - :type dns_prefix: str - :ivar fqdn: FDQN for the agent pool. - :vartype fqdn: str - :param ports: Ports number array used to expose on this agent pool. The - default opened ports are different based on your choice of orchestrator. - :type ports: list[int] - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes - :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet - identifier. - :type vnet_subnet_id: str - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or ~azure.mgmt.containerservice.models.OSType - """ - - _validation = { - 'name': {'required': True}, - 'count': {'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[int]'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, *, name: str, vm_size, count: int=1, os_disk_size_gb: int=None, dns_prefix: str=None, ports=None, storage_profile=None, vnet_subnet_id: str=None, os_type="Linux", **kwargs) -> None: - super(ContainerServiceAgentPoolProfile, self).__init__(**kwargs) - self.name = name - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.dns_prefix = dns_prefix - self.fqdn = None - self.ports = ports - self.storage_profile = storage_profile - self.vnet_subnet_id = vnet_subnet_id - self.os_type = os_type diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_client_enums.py deleted file mode 100644 index 4fe56768c57..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_client_enums.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class ContainerServiceOrchestratorTypes(str, Enum): - - kubernetes = "Kubernetes" - swarm = "Swarm" - dcos = "DCOS" - docker_ce = "DockerCE" - custom = "Custom" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_custom_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_custom_profile.py deleted file mode 100644 index 99a65ee2505..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_custom_profile.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceCustomProfile(Model): - """Properties to configure a custom container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator: Required. The name of the custom orchestrator to use. - :type orchestrator: str - """ - - _validation = { - 'orchestrator': {'required': True}, - } - - _attribute_map = { - 'orchestrator': {'key': 'orchestrator', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceCustomProfile, self).__init__(**kwargs) - self.orchestrator = kwargs.get('orchestrator', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_custom_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_custom_profile_py3.py deleted file mode 100644 index de010d977de..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_custom_profile_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceCustomProfile(Model): - """Properties to configure a custom container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator: Required. The name of the custom orchestrator to use. - :type orchestrator: str - """ - - _validation = { - 'orchestrator': {'required': True}, - } - - _attribute_map = { - 'orchestrator': {'key': 'orchestrator', 'type': 'str'}, - } - - def __init__(self, *, orchestrator: str, **kwargs) -> None: - super(ContainerServiceCustomProfile, self).__init__(**kwargs) - self.orchestrator = orchestrator diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_diagnostics_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_diagnostics_profile.py deleted file mode 100644 index 8cee39284dc..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_diagnostics_profile.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_diagnostics_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_diagnostics_profile_py3.py deleted file mode 100644 index e444694e8a9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_diagnostics_profile_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_linux_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_linux_profile.py deleted file mode 100644 index 4ae1aa042b5..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_linux_profile.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_linux_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_linux_profile_py3.py deleted file mode 100644 index 9756107e1c7..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_linux_profile_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_master_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_master_profile.py deleted file mode 100644 index 07a8ce1266e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_master_profile.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FDQN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_master_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_master_profile_py3.py deleted file mode 100644 index 15457f5e44d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_master_profile_py3.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FDQN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_network_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_network_profile.py deleted file mode 100644 index 45d3bb48aec..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_network_profile.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico' - :type network_policy: str or - ~azure.mgmt.containerservice.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_network_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_network_profile_py3.py deleted file mode 100644 index ec728075a04..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_network_profile_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico' - :type network_policy: str or - ~azure.mgmt.containerservice.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_orchestrator_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_orchestrator_profile.py deleted file mode 100644 index 8f1edad11b9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_orchestrator_profile.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceOrchestratorProfile(Model): - """Profile for the container service orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. The orchestrator to use to manage - container service cluster resources. Valid values are Kubernetes, Swarm, - DCOS, DockerCE and Custom. Possible values include: 'Kubernetes', 'Swarm', - 'DCOS', 'DockerCE', 'Custom' - :type orchestrator_type: str or - ~azure.mgmt.containerservice.models.ContainerServiceOrchestratorTypes - :param orchestrator_version: The version of the orchestrator to use. You - can specify the major.minor.patch part of the actual version.For example, - you can specify version as "1.6.11". - :type orchestrator_version: str - """ - - _validation = { - 'orchestrator_type': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceOrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = kwargs.get('orchestrator_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_orchestrator_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_orchestrator_profile_py3.py deleted file mode 100644 index 54d8bc6aa86..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_orchestrator_profile_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceOrchestratorProfile(Model): - """Profile for the container service orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. The orchestrator to use to manage - container service cluster resources. Valid values are Kubernetes, Swarm, - DCOS, DockerCE and Custom. Possible values include: 'Kubernetes', 'Swarm', - 'DCOS', 'DockerCE', 'Custom' - :type orchestrator_type: str or - ~azure.mgmt.containerservice.models.ContainerServiceOrchestratorTypes - :param orchestrator_version: The version of the orchestrator to use. You - can specify the major.minor.patch part of the actual version.For example, - you can specify version as "1.6.11". - :type orchestrator_version: str - """ - - _validation = { - 'orchestrator_type': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - } - - def __init__(self, *, orchestrator_type, orchestrator_version: str=None, **kwargs) -> None: - super(ContainerServiceOrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = orchestrator_type - self.orchestrator_version = orchestrator_version diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_paged.py deleted file mode 100644 index 10e9c757927..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ContainerServicePaged(Paged): - """ - A paging container for iterating over a list of :class:`ContainerService ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ContainerService]'} - } - - def __init__(self, *args, **kwargs): - - super(ContainerServicePaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_py3.py deleted file mode 100644 index ddec4057c76..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_py3.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ContainerService(Resource): - """Container service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param orchestrator_profile: Required. Profile for the container service - orchestrator. - :type orchestrator_profile: - ~azure.mgmt.containerservice.models.ContainerServiceOrchestratorProfile - :param custom_profile: Properties to configure a custom container service - cluster. - :type custom_profile: - ~azure.mgmt.containerservice.models.ContainerServiceCustomProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. Exact one of - secret or keyVaultSecretRef need to be specified. - :type service_principal_profile: - ~azure.mgmt.containerservice.models.ContainerServiceServicePrincipalProfile - :param master_profile: Required. Profile for the container service master. - :type master_profile: - ~azure.mgmt.containerservice.models.ContainerServiceMasterProfile - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.models.ContainerServiceAgentPoolProfile] - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.models.ContainerServiceWindowsProfile - :param linux_profile: Required. Profile for Linux VMs in the container - service cluster. - :type linux_profile: - ~azure.mgmt.containerservice.models.ContainerServiceLinuxProfile - :param diagnostics_profile: Profile for diagnostics in the container - service cluster. - :type diagnostics_profile: - ~azure.mgmt.containerservice.models.ContainerServiceDiagnosticsProfile - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'orchestrator_profile': {'required': True}, - 'master_profile': {'required': True}, - 'linux_profile': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'orchestrator_profile': {'key': 'properties.orchestratorProfile', 'type': 'ContainerServiceOrchestratorProfile'}, - 'custom_profile': {'key': 'properties.customProfile', 'type': 'ContainerServiceCustomProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ContainerServiceServicePrincipalProfile'}, - 'master_profile': {'key': 'properties.masterProfile', 'type': 'ContainerServiceMasterProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ContainerServiceAgentPoolProfile]'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ContainerServiceWindowsProfile'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'ContainerServiceDiagnosticsProfile'}, - } - - def __init__(self, *, location: str, orchestrator_profile, master_profile, linux_profile, tags=None, custom_profile=None, service_principal_profile=None, agent_pool_profiles=None, windows_profile=None, diagnostics_profile=None, **kwargs) -> None: - super(ContainerService, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.orchestrator_profile = orchestrator_profile - self.custom_profile = custom_profile - self.service_principal_profile = service_principal_profile - self.master_profile = master_profile - self.agent_pool_profiles = agent_pool_profiles - self.windows_profile = windows_profile - self.linux_profile = linux_profile - self.diagnostics_profile = diagnostics_profile diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_service_principal_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_service_principal_profile.py deleted file mode 100644 index acef0ac89b5..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_service_principal_profile.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. Either secret or keyVaultSecretRef must be - specified. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - :param key_vault_secret_ref: Reference to a secret stored in Azure Key - Vault. - :type key_vault_secret_ref: - ~azure.mgmt.containerservice.models.KeyVaultSecretRef - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - 'key_vault_secret_ref': {'key': 'keyVaultSecretRef', 'type': 'KeyVaultSecretRef'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - self.key_vault_secret_ref = kwargs.get('key_vault_secret_ref', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_service_principal_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_service_principal_profile_py3.py deleted file mode 100644 index f08ef052ac1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_service_principal_profile_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. Either secret or keyVaultSecretRef must be - specified. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - :param key_vault_secret_ref: Reference to a secret stored in Azure Key - Vault. - :type key_vault_secret_ref: - ~azure.mgmt.containerservice.models.KeyVaultSecretRef - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - 'key_vault_secret_ref': {'key': 'keyVaultSecretRef', 'type': 'KeyVaultSecretRef'}, - } - - def __init__(self, *, client_id: str, secret: str=None, key_vault_secret_ref=None, **kwargs) -> None: - super(ContainerServiceServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - self.key_vault_secret_ref = key_vault_secret_ref diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_configuration.py deleted file mode 100644 index cce2acd8790..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_configuration.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_configuration_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_configuration_py3.py deleted file mode 100644 index f11d2b896ab..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_configuration_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_public_key.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_public_key.py deleted file mode 100644 index da7609ba222..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_public_key.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_public_key_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_public_key_py3.py deleted file mode 100644 index 8e8c10544ef..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_ssh_public_key_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_vm_diagnostics.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_vm_diagnostics.py deleted file mode 100644 index f1804c66b68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_vm_diagnostics.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_vm_diagnostics_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_vm_diagnostics_py3.py deleted file mode 100644 index a716fc26954..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_vm_diagnostics_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_windows_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_windows_profile.py deleted file mode 100644 index 11acd234331..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_windows_profile.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: Required. The administrator password to use for - Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_windows_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_windows_profile_py3.py deleted file mode 100644 index 3db1f89de79..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/container_service_windows_profile_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: Required. The administrator password to use for - Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str, **kwargs) -> None: - super(ContainerServiceWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_result.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_result.py deleted file mode 100644 index 89e748b481b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_result.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_result_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_result_py3.py deleted file mode 100644 index 6f387834bf0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_result_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_results.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_results.py deleted file mode 100644 index 6360ae308c4..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_results.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_results_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_results_py3.py deleted file mode 100644 index ac5e843261f..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/credential_results_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/key_vault_secret_ref.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/key_vault_secret_ref.py deleted file mode 100644 index 5e3c44cac59..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/key_vault_secret_ref.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretRef(Model): - """Reference to a secret stored in Azure Key Vault. - - All required parameters must be populated in order to send to Azure. - - :param vault_id: Required. Key vault identifier. - :type vault_id: str - :param secret_name: Required. The secret name. - :type secret_name: str - :param version: The secret version. - :type version: str - """ - - _validation = { - 'vault_id': {'required': True}, - 'secret_name': {'required': True}, - } - - _attribute_map = { - 'vault_id': {'key': 'vaultID', 'type': 'str'}, - 'secret_name': {'key': 'secretName', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyVaultSecretRef, self).__init__(**kwargs) - self.vault_id = kwargs.get('vault_id', None) - self.secret_name = kwargs.get('secret_name', None) - self.version = kwargs.get('version', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/key_vault_secret_ref_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/key_vault_secret_ref_py3.py deleted file mode 100644 index be0824abfa9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/key_vault_secret_ref_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultSecretRef(Model): - """Reference to a secret stored in Azure Key Vault. - - All required parameters must be populated in order to send to Azure. - - :param vault_id: Required. Key vault identifier. - :type vault_id: str - :param secret_name: Required. The secret name. - :type secret_name: str - :param version: The secret version. - :type version: str - """ - - _validation = { - 'vault_id': {'required': True}, - 'secret_name': {'required': True}, - } - - _attribute_map = { - 'vault_id': {'key': 'vaultID', 'type': 'str'}, - 'secret_name': {'key': 'secretName', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, vault_id: str, secret_name: str, version: str=None, **kwargs) -> None: - super(KeyVaultSecretRef, self).__init__(**kwargs) - self.vault_id = vault_id - self.secret_name = secret_name - self.version = version diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster.py deleted file mode 100644 index f7c50b26a58..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FDQN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.models.ContainerServiceLinuxProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.models.ManagedClusterAddonProfile] - :ivar node_resource_group: Name of the resource group containing agent - pool nodes. - :vartype node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.models.ManagedClusterAADProfile - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'node_resource_group': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = None - self.enable_rbac = kwargs.get('enable_rbac', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_aad_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_aad_profile.py deleted file mode 100644 index 50e3acd14b6..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_aad_profile.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: Required. The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - 'server_app_secret': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_aad_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_aad_profile_py3.py deleted file mode 100644 index 6db15c1dd6c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_aad_profile_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: Required. The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - 'server_app_secret': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_access_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_access_profile.py deleted file mode 100644 index 6dc2a4ec23b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_access_profile.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_access_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_access_profile_py3.py deleted file mode 100644 index 0d3fb998e97..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_access_profile_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_addon_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_addon_profile.py deleted file mode 100644 index 796f9246a68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_addon_profile.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_addon_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_addon_profile_py3.py deleted file mode 100644 index 71e05cd14c0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_addon_profile_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_agent_pool_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_agent_pool_profile.py deleted file mode 100644 index b3213bf8b32..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_agent_pool_profile.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAgentPoolProfile(Model): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 1 to 100 (inclusive). The default value is - 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :ivar storage_profile: Storage profile specifies what kind of storage - used. Defaults to ManagedDisks. Possible values include: 'StorageAccount', - 'ManagedDisks' - :vartype storage_profile: str or - ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes - :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or ~azure.mgmt.containerservice.models.OSType - """ - - _validation = { - 'name': {'required': True}, - 'count': {'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'storage_profile': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.storage_profile = None - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_agent_pool_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_agent_pool_profile_py3.py deleted file mode 100644 index c545cccfeac..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_agent_pool_profile_py3.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAgentPoolProfile(Model): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 1 to 100 (inclusive). The default value is - 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :ivar storage_profile: Storage profile specifies what kind of storage - used. Defaults to ManagedDisks. Possible values include: 'StorageAccount', - 'ManagedDisks' - :vartype storage_profile: str or - ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes - :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or ~azure.mgmt.containerservice.models.OSType - """ - - _validation = { - 'name': {'required': True}, - 'count': {'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'storage_profile': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, *, name: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = name - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.storage_profile = None - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_paged.py deleted file mode 100644 index 0d1fa204a9f..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_pool_upgrade_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_pool_upgrade_profile.py deleted file mode 100644 index b6967a4a13e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_pool_upgrade_profile.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or ~azure.mgmt.containerservice.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: list[str] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_pool_upgrade_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_pool_upgrade_profile_py3.py deleted file mode 100644 index a7bc407e58e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_pool_upgrade_profile_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or ~azure.mgmt.containerservice.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: list[str] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[str]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_py3.py deleted file mode 100644 index 3f1534d09ae..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_py3.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FDQN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.models.ContainerServiceLinuxProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.models.ManagedClusterAddonProfile] - :ivar node_resource_group: Name of the resource group containing agent - pool nodes. - :vartype node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.models.ManagedClusterAADProfile - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'node_resource_group': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, service_principal_profile=None, addon_profiles=None, enable_rbac: bool=None, network_profile=None, aad_profile=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = None - self.enable_rbac = enable_rbac - self.network_profile = network_profile - self.aad_profile = aad_profile diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_service_principal_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_service_principal_profile.py deleted file mode 100644 index 4610cedac54..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_service_principal_profile.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_service_principal_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_service_principal_profile_py3.py deleted file mode 100644 index 6ea9e92dc40..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_service_principal_profile_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_upgrade_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_upgrade_profile.py deleted file mode 100644 index 11825a0b739..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_upgrade_profile.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_upgrade_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_upgrade_profile_py3.py deleted file mode 100644 index ff69e11fb1b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/managed_cluster_upgrade_profile_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/operation_value.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/operation_value.py deleted file mode 100644 index 911f9fc8088..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/operation_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/operation_value_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/operation_value_paged.py deleted file mode 100644 index ac39a71819a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/operation_value_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/operation_value_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/operation_value_py3.py deleted file mode 100644 index 55bceaa7543..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/operation_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_profile.py deleted file mode 100644 index d5560a1f879..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_profile.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorProfile(Model): - """Contains information about orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = kwargs.get('orchestrator_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_profile_py3.py deleted file mode 100644 index f16e84a1fe3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_profile_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorProfile(Model): - """Contains information about orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - } - - def __init__(self, *, orchestrator_type: str, orchestrator_version: str, **kwargs) -> None: - super(OrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = orchestrator_type - self.orchestrator_version = orchestrator_version diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile.py deleted file mode 100644 index a906f913f69..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorVersionProfile(Model): - """The profile of an orchestrator and its available versions. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - :param default: Required. Installed by default if version is not - specified. - :type default: bool - :param upgrades: Required. The list of available upgrade versions. - :type upgrades: - list[~azure.mgmt.containerservice.models.OrchestratorProfile] - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - 'default': {'required': True}, - 'upgrades': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'default': {'key': 'default', 'type': 'bool'}, - 'upgrades': {'key': 'upgrades', 'type': '[OrchestratorProfile]'}, - } - - def __init__(self, **kwargs): - super(OrchestratorVersionProfile, self).__init__(**kwargs) - self.orchestrator_type = kwargs.get('orchestrator_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.default = kwargs.get('default', None) - self.upgrades = kwargs.get('upgrades', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile_list_result.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile_list_result.py deleted file mode 100644 index 27c2a65798a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile_list_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorVersionProfileListResult(Model): - """The list of versions for supported orchestrators. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the orchestrator version profile list result. - :vartype id: str - :ivar name: Name of the orchestrator version profile list result. - :vartype name: str - :ivar type: Type of the orchestrator version profile list result. - :vartype type: str - :param orchestrators: Required. List of orchestrator version profiles. - :type orchestrators: - list[~azure.mgmt.containerservice.models.OrchestratorVersionProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'orchestrators': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrators': {'key': 'properties.orchestrators', 'type': '[OrchestratorVersionProfile]'}, - } - - def __init__(self, **kwargs): - super(OrchestratorVersionProfileListResult, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.orchestrators = kwargs.get('orchestrators', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile_list_result_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile_list_result_py3.py deleted file mode 100644 index b5bd30a5f54..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile_list_result_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorVersionProfileListResult(Model): - """The list of versions for supported orchestrators. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the orchestrator version profile list result. - :vartype id: str - :ivar name: Name of the orchestrator version profile list result. - :vartype name: str - :ivar type: Type of the orchestrator version profile list result. - :vartype type: str - :param orchestrators: Required. List of orchestrator version profiles. - :type orchestrators: - list[~azure.mgmt.containerservice.models.OrchestratorVersionProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'orchestrators': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrators': {'key': 'properties.orchestrators', 'type': '[OrchestratorVersionProfile]'}, - } - - def __init__(self, *, orchestrators, **kwargs) -> None: - super(OrchestratorVersionProfileListResult, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.orchestrators = orchestrators diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile_py3.py deleted file mode 100644 index c7bf212170a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/orchestrator_version_profile_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorVersionProfile(Model): - """The profile of an orchestrator and its available versions. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - :param default: Required. Installed by default if version is not - specified. - :type default: bool - :param upgrades: Required. The list of available upgrade versions. - :type upgrades: - list[~azure.mgmt.containerservice.models.OrchestratorProfile] - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - 'default': {'required': True}, - 'upgrades': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'default': {'key': 'default', 'type': 'bool'}, - 'upgrades': {'key': 'upgrades', 'type': '[OrchestratorProfile]'}, - } - - def __init__(self, *, orchestrator_type: str, orchestrator_version: str, default: bool, upgrades, **kwargs) -> None: - super(OrchestratorVersionProfile, self).__init__(**kwargs) - self.orchestrator_type = orchestrator_type - self.orchestrator_version = orchestrator_version - self.default = default - self.upgrades = upgrades diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/resource.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/resource.py deleted file mode 100644 index 5dd7d481c68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/resource_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/resource_py3.py deleted file mode 100644 index 2f3702caf60..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/tags_object.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/tags_object.py deleted file mode 100644 index 2966ec220f9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/tags_object.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/tags_object_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/tags_object_py3.py deleted file mode 100644 index 8be0bb4a15d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/models/tags_object_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/__init__.py deleted file mode 100644 index 551547c5317..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_services_operations import ContainerServicesOperations -from .operations import Operations -from .managed_clusters_operations import ManagedClustersOperations - -__all__ = [ - 'ContainerServicesOperations', - 'Operations', - 'ManagedClustersOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/container_services_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/container_services_operations.py deleted file mode 100644 index 887569a8a13..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/container_services_operations.py +++ /dev/null @@ -1,525 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ContainerServicesOperations(object): - """ContainerServicesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of container services in the specified subscription. - - Gets a list of container services in the specified subscription. The - operation returns properties of each container service including state, - orchestrator, number of masters and agents, and FQDNs of masters and - agents. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ContainerService - :rtype: - ~azure.mgmt.containerservice.models.ContainerServicePaged[~azure.mgmt.containerservice.models.ContainerService] - :raises: :class:`CloudError` - """ - api_version = "2017-07-01" - - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ContainerServicePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ContainerServicePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices'} - - - def _create_or_update_initial( - self, resource_group_name, container_service_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2017-07-01" - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ContainerService') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ContainerService', response) - if response.status_code == 201: - deserialized = self._deserialize('ContainerService', response) - if response.status_code == 202: - deserialized = self._deserialize('ContainerService', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, container_service_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a container service. - - Creates or updates a container service with the specified configuration - of orchestrator, masters, and agents. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param container_service_name: The name of the container service in - the specified subscription and resource group. - :type container_service_name: str - :param parameters: Parameters supplied to the Create or Update a - Container Service operation. - :type parameters: ~azure.mgmt.containerservice.models.ContainerService - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ContainerService or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.models.ContainerService] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.models.ContainerService]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - container_service_name=container_service_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ContainerService', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} - - def get( - self, resource_group_name, container_service_name, custom_headers=None, raw=False, **operation_config): - """Gets the properties of the specified container service. - - Gets the properties of the specified container service in the specified - subscription and resource group. The operation returns the properties - including state, orchestrator, number of masters and agents, and FQDNs - of masters and agents. . - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param container_service_name: The name of the container service in - the specified subscription and resource group. - :type container_service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContainerService or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.models.ContainerService or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - api_version = "2017-07-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ContainerService', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} - - - def _delete_initial( - self, resource_group_name, container_service_name, custom_headers=None, raw=False, **operation_config): - api_version = "2017-07-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, container_service_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes the specified container service. - - Deletes the specified container service in the specified subscription - and resource group. The operation does not delete other resources - created as part of creating a container service, including storage - accounts, VMs, and availability sets. All the other resources created - with the container service are part of the same resource group and can - be deleted individually. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param container_service_name: The name of the container service in - the specified subscription and resource group. - :type container_service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - container_service_name=container_service_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of container services in the specified resource group. - - Gets a list of container services in the specified subscription and - resource group. The operation returns properties of each container - service including state, orchestrator, number of masters and agents, - and FQDNs of masters and agents. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ContainerService - :rtype: - ~azure.mgmt.containerservice.models.ContainerServicePaged[~azure.mgmt.containerservice.models.ContainerService] - :raises: :class:`CloudError` - """ - api_version = "2017-07-01" - - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ContainerServicePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ContainerServicePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices'} - - def list_orchestrators( - self, location, resource_type=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported orchestrators in the specified subscription. - - Gets a list of supported orchestrators in the specified subscription. - The operation returns properties of each orchestrator including verison - and available upgrades. - - :param location: The name of a supported Azure region. - :type location: str - :param resource_type: resource type for which the list of - orchestrators needs to be returned - :type resource_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OrchestratorVersionProfileListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.models.OrchestratorVersionProfileListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - api_version = "2017-09-30" - - # Construct URL - url = self.list_orchestrators.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if resource_type is not None: - query_parameters['resource-type'] = self._serialize.query("resource_type", resource_type, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OrchestratorVersionProfileListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_orchestrators.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/operations.py deleted file mode 100644 index a43ead3a313..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/operations.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-03-31". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-03-31" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.models.OperationValuePaged[~azure.mgmt.containerservice.models.OperationValue] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/__init__.py old mode 100644 new mode 100755 index 9854e4f7645..eb3d7ba7a26 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/__init__.py @@ -1,18 +1,16 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from .container_service_client import ContainerServiceClient -from .version import VERSION - +from ._container_service_client import ContainerServiceClient __all__ = ['ContainerServiceClient'] -__version__ = VERSION - +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_configuration.py new file mode 100755 index 00000000000..86c0c85d090 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'azure-mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_container_service_client.py old mode 100644 new mode 100755 similarity index 52% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/container_service_client.py rename to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_container_service_client.py index 938e16974b7..e869970cf5d --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/container_service_client.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_container_service_client.py @@ -9,93 +9,82 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration +from typing import TYPE_CHECKING +from azure.mgmt.core import ARMPipelineClient from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin -from .version import VERSION +from msrest import Deserializer, Serializer +from ._configuration import ContainerServiceClientConfiguration -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse +class _SDKClient(object): + def __init__(self, *args, **kwargs): + """This is a fake class to support current implemetation of MultiApiClientMixin." + Will be removed in final version of multiapi azure-core based client + """ + pass -class ContainerServiceClient(MultiApiClientMixin, SDKClient): +class ContainerServiceClient(MultiApiClientMixin, _SDKClient): """The Container Service Client. - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str - :param str api_version: API version to use if no profile is provided, or if - missing in profile. - :param str base_url: Service URL - :param profile: A dict using operation group name to API version. - :type profile: dict[str, str] + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str + :param profile: A profile definition, from KnownProfiles to dict. + :type profile: azure.profiles.KnownProfiles + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2018-09-01' + DEFAULT_API_VERSION = '2021-05-01' _PROFILE_TAG = "azure.mgmt.containerservice.ContainerServiceClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { - 'open_shift_managed_clusters': '2018-09-30-preview', + None: DEFAULT_API_VERSION, 'container_services': '2017-07-01', - 'managed_clusters': '2020-01-01', - 'operations': '2018-03-31', - None: DEFAULT_API_VERSION + 'open_shift_managed_clusters': '2019-04-30', }}, _PROFILE_TAG + " latest" ) - def __init__(self, credentials, subscription_id, api_version=None, base_url=None, profile=KnownProfiles.default): - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + api_version=None, # type: Optional[str] + base_url=None, # type: Optional[str] + profile=KnownProfiles.default, # type: KnownProfiles + **kwargs # type: Any + ): + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) super(ContainerServiceClient, self).__init__( - credentials, - self.config, api_version=api_version, profile=profile ) -############ Generated from here ############ - @classmethod def _models_dict(cls, api_version): return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} @@ -108,20 +97,27 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2018-03-31: :mod:`v2018_03_31.models` * 2018-08-01-preview: :mod:`v2018_08_01_preview.models` * 2018-09-30-preview: :mod:`v2018_09_30_preview.models` - * 2019-02-01: :mod:`v2019_02_01_.models` - * 2019-04-01: :mod:`v2019_04_01_.models` - * 2019-08-01: :mod:`v2019_08_01_.models` - * 2019-10-01: :mod:`v2019_10_01_.models` - * 2020-01-01: :mod:`v2020_01_01_.models` - * 2020-02-01: :mod:`v2020_02_01_.models` - * 2020-03-01: :mod:`v2020_03_01_.models` - * 2020-04-01: :mod:`v2020_04_01_.models` - * 2020-06-01: :mod:`v2020_06_01_.models` - * 2020-11-01: :mod:`v2020_11_01_.models` - * 2020-12-01: :mod:`v2020_12_01_.models` - * 2021-02-01: :mod:`v2021_02_01_.models` - * 2021-03-01: :mod:`v2021_03_01_.models` - * 2021-05-01: :mod:`v2021_05_01_.models` + * 2019-02-01: :mod:`v2019_02_01.models` + * 2019-04-01: :mod:`v2019_04_01.models` + * 2019-04-30: :mod:`v2019_04_30.models` + * 2019-06-01: :mod:`v2019_06_01.models` + * 2019-08-01: :mod:`v2019_08_01.models` + * 2019-09-30-preview: :mod:`v2019_09_30_preview.models` + * 2019-10-01: :mod:`v2019_10_01.models` + * 2019-10-27-preview: :mod:`v2019_10_27_preview.models` + * 2019-11-01: :mod:`v2019_11_01.models` + * 2020-01-01: :mod:`v2020_01_01.models` + * 2020-02-01: :mod:`v2020_02_01.models` + * 2020-03-01: :mod:`v2020_03_01.models` + * 2020-04-01: :mod:`v2020_04_01.models` + * 2020-06-01: :mod:`v2020_06_01.models` + * 2020-07-01: :mod:`v2020_07_01.models` + * 2020-09-01: :mod:`v2020_09_01.models` + * 2020-11-01: :mod:`v2020_11_01.models` + * 2020-12-01: :mod:`v2020_12_01.models` + * 2021-02-01: :mod:`v2021_02_01.models` + * 2021-03-01: :mod:`v2021_03_01.models` + * 2021-05-01: :mod:`v2021_05_01.models` """ if api_version == '2017-07-01': from .v2017_07_01 import models @@ -141,12 +137,27 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2019-04-01': from .v2019_04_01 import models return models + elif api_version == '2019-04-30': + from .v2019_04_30 import models + return models + elif api_version == '2019-06-01': + from .v2019_06_01 import models + return models elif api_version == '2019-08-01': from .v2019_08_01 import models return models + elif api_version == '2019-09-30-preview': + from .v2019_09_30_preview import models + return models elif api_version == '2019-10-01': from .v2019_10_01 import models return models + elif api_version == '2019-10-27-preview': + from .v2019_10_27_preview import models + return models + elif api_version == '2019-11-01': + from .v2019_11_01 import models + return models elif api_version == '2020-01-01': from .v2020_01_01 import models return models @@ -162,6 +173,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2020-06-01': from .v2020_06_01 import models return models + elif api_version == '2020-07-01': + from .v2020_07_01 import models + return models elif api_version == '2020-09-01': from .v2020_09_01 import models return models @@ -180,29 +194,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2021-05-01': from .v2021_05_01 import models return models - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - - @property - def maintenance_configurations(self): - """Instance depends on the API version: - - * 2020-12-01: :class:`MaintenanceConfigurationsOperations` - * 2021-02-01: :class:`MaintenanceConfigurationsOperations` - * 2021-03-01: :class:`MaintenanceConfigurationsOperations` - * 2021-05-01: :class:`MaintenanceConfigurationsOperations` - """ - api_version = self._get_api_version('maintenance_configurations') - if api_version == '2020-12-01': - from .v2020_12_01.operations import MaintenanceConfigurationsOperations as OperationClass - elif api_version == '2021-02-01': - from .v2021_02_01.operations import MaintenanceConfigurationsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import MaintenanceConfigurationsOperations as OperationClass - elif api_version == '2021-05-01': - from .v2021_05_01.operations import MaintenanceConfigurationsOperations as OperationClass - else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + raise ValueError("API version {} is not available".format(api_version)) @property def agent_pools(self): @@ -210,13 +202,16 @@ def agent_pools(self): * 2019-02-01: :class:`AgentPoolsOperations` * 2019-04-01: :class:`AgentPoolsOperations` + * 2019-06-01: :class:`AgentPoolsOperations` * 2019-08-01: :class:`AgentPoolsOperations` * 2019-10-01: :class:`AgentPoolsOperations` + * 2019-11-01: :class:`AgentPoolsOperations` * 2020-01-01: :class:`AgentPoolsOperations` * 2020-02-01: :class:`AgentPoolsOperations` * 2020-03-01: :class:`AgentPoolsOperations` * 2020-04-01: :class:`AgentPoolsOperations` * 2020-06-01: :class:`AgentPoolsOperations` + * 2020-07-01: :class:`AgentPoolsOperations` * 2020-09-01: :class:`AgentPoolsOperations` * 2020-11-01: :class:`AgentPoolsOperations` * 2020-12-01: :class:`AgentPoolsOperations` @@ -229,10 +224,14 @@ def agent_pools(self): from .v2019_02_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2019-04-01': from .v2019_04_01.operations import AgentPoolsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2019-10-01': from .v2019_10_01.operations import AgentPoolsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2020-01-01': from .v2020_01_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2020-02-01': @@ -243,6 +242,8 @@ def agent_pools(self): from .v2020_04_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import AgentPoolsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2020-09-01': from .v2020_09_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2020-11-01': @@ -256,8 +257,8 @@ def agent_pools(self): elif api_version == '2021-05-01': from .v2021_05_01.operations import AgentPoolsOperations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + raise ValueError("API version {} does not have operation group 'agent_pools'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @property def container_services(self): @@ -268,50 +269,31 @@ def container_services(self): api_version = self._get_api_version('container_services') if api_version == '2017-07-01': from .v2017_07_01.operations import ContainerServicesOperations as OperationClass - elif api_version == "2019-04-01": - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - elif api_version == '2019-08-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2019-08-01 generated Python SDK contains no list_orchestrator op - elif api_version == '2019-10-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2019-10-01 generated Python SDK contains no list_orchestrator op - elif api_version == '2020-01-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2020-01-01 generated Python SDK contains no list_orchestrator op - elif api_version == '2020-02-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2020-02-01 generated Python SDK contains no list_orchestrator op - elif api_version == '2020-03-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2020-03-01 generated Python SDK contains no list_orchestrator op - elif api_version == '2020-04-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2020-04-01 generated Python SDK contains no list_orchestrator op - elif api_version == '2020-06-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2020-06-01 generated Python SDK contains no list_orchestrator op - elif api_version == '2020-09-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2020-09-01 generated Python SDK contains no list_orchestrator op - elif api_version == '2020-11-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2020-11-01 generated Python SDK contains no list_orchestrator op - elif api_version == '2020-12-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2020-12-01 generated Python SDK contains no list_orchestrator op + else: + raise ValueError("API version {} does not have operation group 'container_services'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def maintenance_configurations(self): + """Instance depends on the API version: + + * 2020-12-01: :class:`MaintenanceConfigurationsOperations` + * 2021-02-01: :class:`MaintenanceConfigurationsOperations` + * 2021-03-01: :class:`MaintenanceConfigurationsOperations` + * 2021-05-01: :class:`MaintenanceConfigurationsOperations` + """ + api_version = self._get_api_version('maintenance_configurations') + if api_version == '2020-12-01': + from .v2020_12_01.operations import MaintenanceConfigurationsOperations as OperationClass elif api_version == '2021-02-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2021-02-01 generated Python SDK contains no list_orchestrator op + from .v2021_02_01.operations import MaintenanceConfigurationsOperations as OperationClass elif api_version == '2021-03-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2021-03-01 generated Python SDK contains no list_orchestrator op + from .v2021_03_01.operations import MaintenanceConfigurationsOperations as OperationClass elif api_version == '2021-05-01': - from .v2019_04_01.operations import ContainerServicesOperations as OperationClass - api_version = "2019-04-01" #2021-05-01 generated Python SDK contains no list_orchestrator op + from .v2021_05_01.operations import MaintenanceConfigurationsOperations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + raise ValueError("API version {} does not have operation group 'maintenance_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @property def managed_clusters(self): @@ -321,13 +303,16 @@ def managed_clusters(self): * 2018-08-01-preview: :class:`ManagedClustersOperations` * 2019-02-01: :class:`ManagedClustersOperations` * 2019-04-01: :class:`ManagedClustersOperations` + * 2019-06-01: :class:`ManagedClustersOperations` * 2019-08-01: :class:`ManagedClustersOperations` * 2019-10-01: :class:`ManagedClustersOperations` + * 2019-11-01: :class:`ManagedClustersOperations` * 2020-01-01: :class:`ManagedClustersOperations` * 2020-02-01: :class:`ManagedClustersOperations` * 2020-03-01: :class:`ManagedClustersOperations` * 2020-04-01: :class:`ManagedClustersOperations` * 2020-06-01: :class:`ManagedClustersOperations` + * 2020-07-01: :class:`ManagedClustersOperations` * 2020-09-01: :class:`ManagedClustersOperations` * 2020-11-01: :class:`ManagedClustersOperations` * 2020-12-01: :class:`ManagedClustersOperations` @@ -344,10 +329,14 @@ def managed_clusters(self): from .v2019_02_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2019-04-01': from .v2019_04_01.operations import ManagedClustersOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2019-10-01': from .v2019_10_01.operations import ManagedClustersOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2020-01-01': from .v2020_01_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2020-02-01': @@ -358,6 +347,8 @@ def managed_clusters(self): from .v2020_04_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import ManagedClustersOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2020-09-01': from .v2020_09_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2020-11-01': @@ -371,21 +362,30 @@ def managed_clusters(self): elif api_version == '2021-05-01': from .v2021_05_01.operations import ManagedClustersOperations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + raise ValueError("API version {} does not have operation group 'managed_clusters'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @property def open_shift_managed_clusters(self): """Instance depends on the API version: * 2018-09-30-preview: :class:`OpenShiftManagedClustersOperations` + * 2019-04-30: :class:`OpenShiftManagedClustersOperations` + * 2019-09-30-preview: :class:`OpenShiftManagedClustersOperations` + * 2019-10-27-preview: :class:`OpenShiftManagedClustersOperations` """ api_version = self._get_api_version('open_shift_managed_clusters') if api_version == '2018-09-30-preview': from .v2018_09_30_preview.operations import OpenShiftManagedClustersOperations as OperationClass + elif api_version == '2019-04-30': + from .v2019_04_30.operations import OpenShiftManagedClustersOperations as OperationClass + elif api_version == '2019-09-30-preview': + from .v2019_09_30_preview.operations import OpenShiftManagedClustersOperations as OperationClass + elif api_version == '2019-10-27-preview': + from .v2019_10_27_preview.operations import OpenShiftManagedClustersOperations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + raise ValueError("API version {} does not have operation group 'open_shift_managed_clusters'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @property def operations(self): @@ -395,13 +395,16 @@ def operations(self): * 2018-08-01-preview: :class:`Operations` * 2019-02-01: :class:`Operations` * 2019-04-01: :class:`Operations` + * 2019-06-01: :class:`Operations` * 2019-08-01: :class:`Operations` * 2019-10-01: :class:`Operations` + * 2019-11-01: :class:`Operations` * 2020-01-01: :class:`Operations` * 2020-02-01: :class:`Operations` * 2020-03-01: :class:`Operations` * 2020-04-01: :class:`Operations` * 2020-06-01: :class:`Operations` + * 2020-07-01: :class:`Operations` * 2020-09-01: :class:`Operations` * 2020-11-01: :class:`Operations` * 2020-12-01: :class:`Operations` @@ -418,10 +421,14 @@ def operations(self): from .v2019_02_01.operations import Operations as OperationClass elif api_version == '2019-04-01': from .v2019_04_01.operations import Operations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import Operations as OperationClass elif api_version == '2019-08-01': from .v2019_08_01.operations import Operations as OperationClass elif api_version == '2019-10-01': from .v2019_10_01.operations import Operations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import Operations as OperationClass elif api_version == '2020-01-01': from .v2020_01_01.operations import Operations as OperationClass elif api_version == '2020-02-01': @@ -432,6 +439,8 @@ def operations(self): from .v2020_04_01.operations import Operations as OperationClass elif api_version == '2020-06-01': from .v2020_06_01.operations import Operations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import Operations as OperationClass elif api_version == '2020-09-01': from .v2020_09_01.operations import Operations as OperationClass elif api_version == '2020-11-01': @@ -445,5 +454,103 @@ def operations(self): elif api_version == '2021-05-01': from .v2021_05_01.operations import Operations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) - return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def private_endpoint_connections(self): + """Instance depends on the API version: + + * 2020-06-01: :class:`PrivateEndpointConnectionsOperations` + * 2020-07-01: :class:`PrivateEndpointConnectionsOperations` + * 2020-09-01: :class:`PrivateEndpointConnectionsOperations` + * 2020-11-01: :class:`PrivateEndpointConnectionsOperations` + * 2020-12-01: :class:`PrivateEndpointConnectionsOperations` + * 2021-02-01: :class:`PrivateEndpointConnectionsOperations` + * 2021-03-01: :class:`PrivateEndpointConnectionsOperations` + * 2021-05-01: :class:`PrivateEndpointConnectionsOperations` + """ + api_version = self._get_api_version('private_endpoint_connections') + if api_version == '2020-06-01': + from .v2020_06_01.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-09-01': + from .v2020_09_01.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import PrivateEndpointConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def private_link_resources(self): + """Instance depends on the API version: + + * 2020-09-01: :class:`PrivateLinkResourcesOperations` + * 2020-11-01: :class:`PrivateLinkResourcesOperations` + * 2020-12-01: :class:`PrivateLinkResourcesOperations` + * 2021-02-01: :class:`PrivateLinkResourcesOperations` + * 2021-03-01: :class:`PrivateLinkResourcesOperations` + * 2021-05-01: :class:`PrivateLinkResourcesOperations` + """ + api_version = self._get_api_version('private_link_resources') + if api_version == '2020-09-01': + from .v2020_09_01.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import PrivateLinkResourcesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def resolve_private_link_service_id(self): + """Instance depends on the API version: + + * 2020-09-01: :class:`ResolvePrivateLinkServiceIdOperations` + * 2020-11-01: :class:`ResolvePrivateLinkServiceIdOperations` + * 2020-12-01: :class:`ResolvePrivateLinkServiceIdOperations` + * 2021-02-01: :class:`ResolvePrivateLinkServiceIdOperations` + * 2021-03-01: :class:`ResolvePrivateLinkServiceIdOperations` + * 2021-05-01: :class:`ResolvePrivateLinkServiceIdOperations` + """ + api_version = self._get_api_version('resolve_private_link_service_id') + if api_version == '2020-09-01': + from .v2020_09_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + elif api_version == '2020-12-01': + from .v2020_12_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + elif api_version == '2021-03-01': + from .v2021_03_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'resolve_private_link_service_id'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + def close(self): + self._client.close() + def __enter__(self): + self._client.__enter__() + return self + def __exit__(self, *exc_details): + self._client.__exit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_version.py old mode 100644 new mode 100755 similarity index 96% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/version.py rename to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_version.py index c215e51b49f..ef6549b6f33 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/version.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_version.py @@ -9,5 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "4.2.2" - +VERSION = "16.0.0" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/models.py old mode 100644 new mode 100755 index c7e9658fe5e..46a4c060a97 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/models.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/models.py @@ -3,28 +3,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. # -------------------------------------------------------------------------- - from .v2017_07_01.models import * -from .v2018_03_31.models import * -from .v2018_08_01_preview.models import * -from .v2018_09_30_preview.models import * -from .v2019_02_01.models import * -from .v2019_04_01.models import * -from .v2019_08_01.models import * -from .v2019_10_01.models import * -from .v2020_01_01.models import * -from .v2020_02_01.models import * -from .v2020_03_01.models import * -from .v2020_04_01.models import * -from .v2020_06_01.models import * -from .v2020_09_01.models import * -from .v2020_11_01.models import * -from .v2020_12_01.models import * -from .v2021_02_01.models import * -from .v2021_03_01.models import * -from .v2021_05_01.models import * \ No newline at end of file +from .v2019_04_30.models import * +from .v2021_05_01.models import * diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/__init__.py old mode 100644 new mode 100755 similarity index 68% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/__init__.py rename to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/__init__.py index 9854e4f7645..eb3d7ba7a26 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/__init__.py @@ -1,18 +1,16 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from .container_service_client import ContainerServiceClient -from .version import VERSION - +from ._container_service_client import ContainerServiceClient __all__ = ['ContainerServiceClient'] -__version__ = VERSION - +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/_configuration.py new file mode 100755 index 00000000000..085ca045efa --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/_configuration.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/_container_service_client.py new file mode 100755 index 00000000000..2e860be77ae --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/_container_service_client.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import ContainerServiceClientConfiguration +from .operations import ContainerServicesOperations +from . import models + + +class ContainerServiceClient(object): + """The Container Service Client. + + :ivar container_services: ContainerServicesOperations operations + :vartype container_services: azure.mgmt.containerservice.v2017_07_01.operations.ContainerServicesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.container_services = ContainerServicesOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> ContainerServiceClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/__init__.py old mode 100644 new mode 100755 similarity index 73% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/version.py rename to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/__init__.py index fc241ef662d..4ad2bb20096 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/version.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/__init__.py @@ -1,13 +1,10 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2019-02-01" - +from ._container_service_client import ContainerServiceClient +__all__ = ['ContainerServiceClient'] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/_configuration.py new file mode 100755 index 00000000000..fc5eb921630 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/_configuration.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/_container_service_client.py new file mode 100755 index 00000000000..3285c25911c --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/_container_service_client.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import ContainerServiceClientConfiguration +from .operations import ContainerServicesOperations +from .. import models + + +class ContainerServiceClient(object): + """The Container Service Client. + + :ivar container_services: ContainerServicesOperations operations + :vartype container_services: azure.mgmt.containerservice.v2017_07_01.aio.operations.ContainerServicesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.container_services = ContainerServicesOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "ContainerServiceClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/operations/__init__.py new file mode 100755 index 00000000000..db0e90a3a5a --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/operations/__init__.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._container_services_operations import ContainerServicesOperations + +__all__ = [ + 'ContainerServicesOperations', +] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/operations/_container_services_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/operations/_container_services_operations.py new file mode 100755 index 00000000000..a837c0c0626 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/aio/operations/_container_services_operations.py @@ -0,0 +1,561 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ContainerServicesOperations: + """ContainerServicesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2017_07_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ContainerServiceListResult"]: + """Gets a list of container services in the specified subscription. + + Gets a list of container services in the specified subscription. The operation returns + properties of each container service including state, orchestrator, number of masters and + agents, and FQDNs of masters and agents. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ContainerServiceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerServiceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ContainerServiceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + container_service_name: str, + parameters: "_models.ContainerService", + **kwargs: Any + ) -> "_models.ContainerService": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ContainerService') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ContainerService', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ContainerService', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ContainerService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + container_service_name: str, + parameters: "_models.ContainerService", + **kwargs: Any + ) -> AsyncLROPoller["_models.ContainerService"]: + """Creates or updates a container service. + + Creates or updates a container service with the specified configuration of orchestrator, + masters, and agents. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param container_service_name: The name of the container service in the specified subscription + and resource group. + :type container_service_name: str + :param parameters: Parameters supplied to the Create or Update a Container Service operation. + :type parameters: ~azure.mgmt.containerservice.v2017_07_01.models.ContainerService + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ContainerService or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2017_07_01.models.ContainerService] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerService"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + container_service_name=container_service_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ContainerService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + container_service_name: str, + **kwargs: Any + ) -> "_models.ContainerService": + """Gets the properties of the specified container service. + + Gets the properties of the specified container service in the specified subscription and + resource group. The operation returns the properties including state, orchestrator, number of + masters and agents, and FQDNs of masters and agents. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param container_service_name: The name of the container service in the specified subscription + and resource group. + :type container_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ContainerService, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2017_07_01.models.ContainerService + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ContainerService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + container_service_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + container_service_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified container service. + + Deletes the specified container service in the specified subscription and resource group. The + operation does not delete other resources created as part of creating a container service, + including storage accounts, VMs, and availability sets. All the other resources created with + the container service are part of the same resource group and can be deleted individually. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param container_service_name: The name of the container service in the specified subscription + and resource group. + :type container_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + container_service_name=container_service_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ContainerServiceListResult"]: + """Gets a list of container services in the specified resource group. + + Gets a list of container services in the specified subscription and resource group. The + operation returns properties of each container service including state, orchestrator, number of + masters and agents, and FQDNs of masters and agents. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ContainerServiceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerServiceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ContainerServiceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices'} # type: ignore + + async def list_orchestrators( + self, + location: str, + resource_type: Optional[str] = None, + **kwargs: Any + ) -> "_models.OrchestratorVersionProfileListResult": + """Gets a list of supported orchestrators in the specified subscription. + + Gets a list of supported orchestrators in the specified subscription. The operation returns + properties of each orchestrator including version, available upgrades and whether that version + or upgrades are in preview. + + :param location: The name of a supported Azure region. + :type location: str + :param resource_type: resource type for which the list of orchestrators needs to be returned. + :type resource_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OrchestratorVersionProfileListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2017_07_01.models.OrchestratorVersionProfileListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrchestratorVersionProfileListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.list_orchestrators.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if resource_type is not None: + query_parameters['resource-type'] = self._serialize.query("resource_type", resource_type, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OrchestratorVersionProfileListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_orchestrators.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/__init__.py new file mode 100755 index 00000000000..756ee52d39f --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/__init__.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import ContainerService + from ._models_py3 import ContainerServiceAgentPoolProfile + from ._models_py3 import ContainerServiceCustomProfile + from ._models_py3 import ContainerServiceDiagnosticsProfile + from ._models_py3 import ContainerServiceLinuxProfile + from ._models_py3 import ContainerServiceListResult + from ._models_py3 import ContainerServiceMasterProfile + from ._models_py3 import ContainerServiceOrchestratorProfile + from ._models_py3 import ContainerServicePrincipalProfile + from ._models_py3 import ContainerServiceSshConfiguration + from ._models_py3 import ContainerServiceSshPublicKey + from ._models_py3 import ContainerServiceVMDiagnostics + from ._models_py3 import ContainerServiceWindowsProfile + from ._models_py3 import KeyVaultSecretRef + from ._models_py3 import OrchestratorProfile + from ._models_py3 import OrchestratorVersionProfile + from ._models_py3 import OrchestratorVersionProfileListResult + from ._models_py3 import Resource +except (SyntaxError, ImportError): + from ._models import ContainerService # type: ignore + from ._models import ContainerServiceAgentPoolProfile # type: ignore + from ._models import ContainerServiceCustomProfile # type: ignore + from ._models import ContainerServiceDiagnosticsProfile # type: ignore + from ._models import ContainerServiceLinuxProfile # type: ignore + from ._models import ContainerServiceListResult # type: ignore + from ._models import ContainerServiceMasterProfile # type: ignore + from ._models import ContainerServiceOrchestratorProfile # type: ignore + from ._models import ContainerServicePrincipalProfile # type: ignore + from ._models import ContainerServiceSshConfiguration # type: ignore + from ._models import ContainerServiceSshPublicKey # type: ignore + from ._models import ContainerServiceVMDiagnostics # type: ignore + from ._models import ContainerServiceWindowsProfile # type: ignore + from ._models import KeyVaultSecretRef # type: ignore + from ._models import OrchestratorProfile # type: ignore + from ._models import OrchestratorVersionProfile # type: ignore + from ._models import OrchestratorVersionProfileListResult # type: ignore + from ._models import Resource # type: ignore + +from ._container_service_client_enums import ( + ContainerServiceOrchestratorTypes, + ContainerServiceStorageProfileTypes, + ContainerServiceVMSizeTypes, + Count, + OSType, +) + +__all__ = [ + 'ContainerService', + 'ContainerServiceAgentPoolProfile', + 'ContainerServiceCustomProfile', + 'ContainerServiceDiagnosticsProfile', + 'ContainerServiceLinuxProfile', + 'ContainerServiceListResult', + 'ContainerServiceMasterProfile', + 'ContainerServiceOrchestratorProfile', + 'ContainerServicePrincipalProfile', + 'ContainerServiceSshConfiguration', + 'ContainerServiceSshPublicKey', + 'ContainerServiceVMDiagnostics', + 'ContainerServiceWindowsProfile', + 'KeyVaultSecretRef', + 'OrchestratorProfile', + 'OrchestratorVersionProfile', + 'OrchestratorVersionProfileListResult', + 'Resource', + 'ContainerServiceOrchestratorTypes', + 'ContainerServiceStorageProfileTypes', + 'ContainerServiceVMSizeTypes', + 'Count', + 'OSType', +] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/_container_service_client_enums.py new file mode 100755 index 00000000000..a14dea47c37 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/_container_service_client_enums.py @@ -0,0 +1,241 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class ContainerServiceOrchestratorTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The orchestrator to use to manage container service cluster resources. Valid values are + Kubernetes, Swarm, DCOS, DockerCE and Custom. + """ + + KUBERNETES = "Kubernetes" + SWARM = "Swarm" + DCOS = "DCOS" + DOCKER_CE = "DockerCE" + CUSTOM = "Custom" + +class ContainerServiceStorageProfileTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Storage profile specifies what kind of storage used. Choose from StorageAccount and + ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. + """ + + STORAGE_ACCOUNT = "StorageAccount" + MANAGED_DISKS = "ManagedDisks" + +class ContainerServiceVMSizeTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Size of agent VMs. + """ + + STANDARD_A1 = "Standard_A1" + STANDARD_A10 = "Standard_A10" + STANDARD_A11 = "Standard_A11" + STANDARD_A1_V2 = "Standard_A1_v2" + STANDARD_A2 = "Standard_A2" + STANDARD_A2_V2 = "Standard_A2_v2" + STANDARD_A2_M_V2 = "Standard_A2m_v2" + STANDARD_A3 = "Standard_A3" + STANDARD_A4 = "Standard_A4" + STANDARD_A4_V2 = "Standard_A4_v2" + STANDARD_A4_M_V2 = "Standard_A4m_v2" + STANDARD_A5 = "Standard_A5" + STANDARD_A6 = "Standard_A6" + STANDARD_A7 = "Standard_A7" + STANDARD_A8 = "Standard_A8" + STANDARD_A8_V2 = "Standard_A8_v2" + STANDARD_A8_M_V2 = "Standard_A8m_v2" + STANDARD_A9 = "Standard_A9" + STANDARD_B2_MS = "Standard_B2ms" + STANDARD_B2_S = "Standard_B2s" + STANDARD_B4_MS = "Standard_B4ms" + STANDARD_B8_MS = "Standard_B8ms" + STANDARD_D1 = "Standard_D1" + STANDARD_D11 = "Standard_D11" + STANDARD_D11_V2 = "Standard_D11_v2" + STANDARD_D11_V2_PROMO = "Standard_D11_v2_Promo" + STANDARD_D12 = "Standard_D12" + STANDARD_D12_V2 = "Standard_D12_v2" + STANDARD_D12_V2_PROMO = "Standard_D12_v2_Promo" + STANDARD_D13 = "Standard_D13" + STANDARD_D13_V2 = "Standard_D13_v2" + STANDARD_D13_V2_PROMO = "Standard_D13_v2_Promo" + STANDARD_D14 = "Standard_D14" + STANDARD_D14_V2 = "Standard_D14_v2" + STANDARD_D14_V2_PROMO = "Standard_D14_v2_Promo" + STANDARD_D15_V2 = "Standard_D15_v2" + STANDARD_D16_V3 = "Standard_D16_v3" + STANDARD_D16_S_V3 = "Standard_D16s_v3" + STANDARD_D1_V2 = "Standard_D1_v2" + STANDARD_D2 = "Standard_D2" + STANDARD_D2_V2 = "Standard_D2_v2" + STANDARD_D2_V2_PROMO = "Standard_D2_v2_Promo" + STANDARD_D2_V3 = "Standard_D2_v3" + STANDARD_D2_S_V3 = "Standard_D2s_v3" + STANDARD_D3 = "Standard_D3" + STANDARD_D32_V3 = "Standard_D32_v3" + STANDARD_D32_S_V3 = "Standard_D32s_v3" + STANDARD_D3_V2 = "Standard_D3_v2" + STANDARD_D3_V2_PROMO = "Standard_D3_v2_Promo" + STANDARD_D4 = "Standard_D4" + STANDARD_D4_V2 = "Standard_D4_v2" + STANDARD_D4_V2_PROMO = "Standard_D4_v2_Promo" + STANDARD_D4_V3 = "Standard_D4_v3" + STANDARD_D4_S_V3 = "Standard_D4s_v3" + STANDARD_D5_V2 = "Standard_D5_v2" + STANDARD_D5_V2_PROMO = "Standard_D5_v2_Promo" + STANDARD_D64_V3 = "Standard_D64_v3" + STANDARD_D64_S_V3 = "Standard_D64s_v3" + STANDARD_D8_V3 = "Standard_D8_v3" + STANDARD_D8_S_V3 = "Standard_D8s_v3" + STANDARD_DS1 = "Standard_DS1" + STANDARD_DS11 = "Standard_DS11" + STANDARD_DS11_V2 = "Standard_DS11_v2" + STANDARD_DS11_V2_PROMO = "Standard_DS11_v2_Promo" + STANDARD_DS12 = "Standard_DS12" + STANDARD_DS12_V2 = "Standard_DS12_v2" + STANDARD_DS12_V2_PROMO = "Standard_DS12_v2_Promo" + STANDARD_DS13 = "Standard_DS13" + STANDARD_DS13_2_V2 = "Standard_DS13-2_v2" + STANDARD_DS13_4_V2 = "Standard_DS13-4_v2" + STANDARD_DS13_V2 = "Standard_DS13_v2" + STANDARD_DS13_V2_PROMO = "Standard_DS13_v2_Promo" + STANDARD_DS14 = "Standard_DS14" + STANDARD_DS14_4_V2 = "Standard_DS14-4_v2" + STANDARD_DS14_8_V2 = "Standard_DS14-8_v2" + STANDARD_DS14_V2 = "Standard_DS14_v2" + STANDARD_DS14_V2_PROMO = "Standard_DS14_v2_Promo" + STANDARD_DS15_V2 = "Standard_DS15_v2" + STANDARD_DS1_V2 = "Standard_DS1_v2" + STANDARD_DS2 = "Standard_DS2" + STANDARD_DS2_V2 = "Standard_DS2_v2" + STANDARD_DS2_V2_PROMO = "Standard_DS2_v2_Promo" + STANDARD_DS3 = "Standard_DS3" + STANDARD_DS3_V2 = "Standard_DS3_v2" + STANDARD_DS3_V2_PROMO = "Standard_DS3_v2_Promo" + STANDARD_DS4 = "Standard_DS4" + STANDARD_DS4_V2 = "Standard_DS4_v2" + STANDARD_DS4_V2_PROMO = "Standard_DS4_v2_Promo" + STANDARD_DS5_V2 = "Standard_DS5_v2" + STANDARD_DS5_V2_PROMO = "Standard_DS5_v2_Promo" + STANDARD_E16_V3 = "Standard_E16_v3" + STANDARD_E16_S_V3 = "Standard_E16s_v3" + STANDARD_E2_V3 = "Standard_E2_v3" + STANDARD_E2_S_V3 = "Standard_E2s_v3" + STANDARD_E32_16_S_V3 = "Standard_E32-16s_v3" + STANDARD_E32_8_S_V3 = "Standard_E32-8s_v3" + STANDARD_E32_V3 = "Standard_E32_v3" + STANDARD_E32_S_V3 = "Standard_E32s_v3" + STANDARD_E4_V3 = "Standard_E4_v3" + STANDARD_E4_S_V3 = "Standard_E4s_v3" + STANDARD_E64_16_S_V3 = "Standard_E64-16s_v3" + STANDARD_E64_32_S_V3 = "Standard_E64-32s_v3" + STANDARD_E64_V3 = "Standard_E64_v3" + STANDARD_E64_S_V3 = "Standard_E64s_v3" + STANDARD_E8_V3 = "Standard_E8_v3" + STANDARD_E8_S_V3 = "Standard_E8s_v3" + STANDARD_F1 = "Standard_F1" + STANDARD_F16 = "Standard_F16" + STANDARD_F16_S = "Standard_F16s" + STANDARD_F16_S_V2 = "Standard_F16s_v2" + STANDARD_F1_S = "Standard_F1s" + STANDARD_F2 = "Standard_F2" + STANDARD_F2_S = "Standard_F2s" + STANDARD_F2_S_V2 = "Standard_F2s_v2" + STANDARD_F32_S_V2 = "Standard_F32s_v2" + STANDARD_F4 = "Standard_F4" + STANDARD_F4_S = "Standard_F4s" + STANDARD_F4_S_V2 = "Standard_F4s_v2" + STANDARD_F64_S_V2 = "Standard_F64s_v2" + STANDARD_F72_S_V2 = "Standard_F72s_v2" + STANDARD_F8 = "Standard_F8" + STANDARD_F8_S = "Standard_F8s" + STANDARD_F8_S_V2 = "Standard_F8s_v2" + STANDARD_G1 = "Standard_G1" + STANDARD_G2 = "Standard_G2" + STANDARD_G3 = "Standard_G3" + STANDARD_G4 = "Standard_G4" + STANDARD_G5 = "Standard_G5" + STANDARD_GS1 = "Standard_GS1" + STANDARD_GS2 = "Standard_GS2" + STANDARD_GS3 = "Standard_GS3" + STANDARD_GS4 = "Standard_GS4" + STANDARD_GS4_4 = "Standard_GS4-4" + STANDARD_GS4_8 = "Standard_GS4-8" + STANDARD_GS5 = "Standard_GS5" + STANDARD_GS5_16 = "Standard_GS5-16" + STANDARD_GS5_8 = "Standard_GS5-8" + STANDARD_H16 = "Standard_H16" + STANDARD_H16_M = "Standard_H16m" + STANDARD_H16_MR = "Standard_H16mr" + STANDARD_H16_R = "Standard_H16r" + STANDARD_H8 = "Standard_H8" + STANDARD_H8_M = "Standard_H8m" + STANDARD_L16_S = "Standard_L16s" + STANDARD_L32_S = "Standard_L32s" + STANDARD_L4_S = "Standard_L4s" + STANDARD_L8_S = "Standard_L8s" + STANDARD_M128_32_MS = "Standard_M128-32ms" + STANDARD_M128_64_MS = "Standard_M128-64ms" + STANDARD_M128_MS = "Standard_M128ms" + STANDARD_M128_S = "Standard_M128s" + STANDARD_M64_16_MS = "Standard_M64-16ms" + STANDARD_M64_32_MS = "Standard_M64-32ms" + STANDARD_M64_MS = "Standard_M64ms" + STANDARD_M64_S = "Standard_M64s" + STANDARD_NC12 = "Standard_NC12" + STANDARD_NC12_S_V2 = "Standard_NC12s_v2" + STANDARD_NC12_S_V3 = "Standard_NC12s_v3" + STANDARD_NC24 = "Standard_NC24" + STANDARD_NC24_R = "Standard_NC24r" + STANDARD_NC24_RS_V2 = "Standard_NC24rs_v2" + STANDARD_NC24_RS_V3 = "Standard_NC24rs_v3" + STANDARD_NC24_S_V2 = "Standard_NC24s_v2" + STANDARD_NC24_S_V3 = "Standard_NC24s_v3" + STANDARD_NC6 = "Standard_NC6" + STANDARD_NC6_S_V2 = "Standard_NC6s_v2" + STANDARD_NC6_S_V3 = "Standard_NC6s_v3" + STANDARD_ND12_S = "Standard_ND12s" + STANDARD_ND24_RS = "Standard_ND24rs" + STANDARD_ND24_S = "Standard_ND24s" + STANDARD_ND6_S = "Standard_ND6s" + STANDARD_NV12 = "Standard_NV12" + STANDARD_NV24 = "Standard_NV24" + STANDARD_NV6 = "Standard_NV6" + +class Count(with_metaclass(_CaseInsensitiveEnumMeta, int, Enum)): + """Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The + default value is 1. + """ + + ONE = 1 + THREE = 3 + FIVE = 5 + +class OSType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + """ + + LINUX = "Linux" + WINDOWS = "Windows" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/_models.py new file mode 100755 index 00000000000..f4993afd77c --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/_models.py @@ -0,0 +1,804 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import msrest.serialization + + +class Resource(msrest.serialization.Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + + +class ContainerService(Resource): + """Container service. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param orchestrator_profile: Profile for the container service orchestrator. + :type orchestrator_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceOrchestratorProfile + :param custom_profile: Properties to configure a custom container service cluster. + :type custom_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceCustomProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. Exact one of secret or keyVaultSecretRef need to be + specified. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServicePrincipalProfile + :param master_profile: Profile for the container service master. + :type master_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceMasterProfile + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceAgentPoolProfile] + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceWindowsProfile + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceLinuxProfile + :param diagnostics_profile: Profile for diagnostics in the container service cluster. + :type diagnostics_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceDiagnosticsProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'orchestrator_profile': {'key': 'properties.orchestratorProfile', 'type': 'ContainerServiceOrchestratorProfile'}, + 'custom_profile': {'key': 'properties.customProfile', 'type': 'ContainerServiceCustomProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ContainerServicePrincipalProfile'}, + 'master_profile': {'key': 'properties.masterProfile', 'type': 'ContainerServiceMasterProfile'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ContainerServiceAgentPoolProfile]'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ContainerServiceWindowsProfile'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'ContainerServiceDiagnosticsProfile'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerService, self).__init__(**kwargs) + self.provisioning_state = None + self.orchestrator_profile = kwargs.get('orchestrator_profile', None) + self.custom_profile = kwargs.get('custom_profile', None) + self.service_principal_profile = kwargs.get('service_principal_profile', None) + self.master_profile = kwargs.get('master_profile', None) + self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) + self.windows_profile = kwargs.get('windows_profile', None) + self.linux_profile = kwargs.get('linux_profile', None) + self.diagnostics_profile = kwargs.get('diagnostics_profile', None) + + +class ContainerServiceAgentPoolProfile(msrest.serialization.Model): + """Profile for the container service agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Unique name of the agent pool profile in the context of the subscription + and resource group. + :type name: str + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 1 to 100 (inclusive). The default value is 1. + :type count: int + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param dns_prefix: DNS prefix to be used to create the FQDN for the agent pool. + :type dns_prefix: str + :ivar fqdn: FQDN for the agent pool. + :vartype fqdn: str + :param ports: Ports number array used to expose on this agent pool. The default opened ports + are different based on your choice of orchestrator. + :type ports: list[int] + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". + :type storage_profile: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceStorageProfileTypes + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2017_07_01.models.OSType + """ + + _validation = { + 'name': {'required': True}, + 'count': {'maximum': 100, 'minimum': 1}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[int]'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceAgentPoolProfile, self).__init__(**kwargs) + self.name = kwargs['name'] + self.count = kwargs.get('count', 1) + self.vm_size = kwargs['vm_size'] + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.dns_prefix = kwargs.get('dns_prefix', None) + self.fqdn = None + self.ports = kwargs.get('ports', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.os_type = kwargs.get('os_type', "Linux") + + +class ContainerServiceCustomProfile(msrest.serialization.Model): + """Properties to configure a custom container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator: Required. The name of the custom orchestrator to use. + :type orchestrator: str + """ + + _validation = { + 'orchestrator': {'required': True}, + } + + _attribute_map = { + 'orchestrator': {'key': 'orchestrator', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceCustomProfile, self).__init__(**kwargs) + self.orchestrator = kwargs['orchestrator'] + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): + """Profile for diagnostics on the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. + :type vm_diagnostics: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceVMDiagnostics + """ + + _validation = { + 'vm_diagnostics': {'required': True}, + } + + _attribute_map = { + 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) + self.vm_diagnostics = kwargs['vm_diagnostics'] + + +class ContainerServiceLinuxProfile(msrest.serialization.Model): + """Profile for Linux VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for Linux VMs. + :type admin_username: str + :param ssh: Required. SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceSshConfiguration + """ + + _validation = { + 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, + 'ssh': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceLinuxProfile, self).__init__(**kwargs) + self.admin_username = kwargs['admin_username'] + self.ssh = kwargs['ssh'] + + +class ContainerServiceListResult(msrest.serialization.Model): + """The response from the List Container Services operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of container services. + :type value: list[~azure.mgmt.containerservice.v2017_07_01.models.ContainerService] + :ivar next_link: The URL to get the next set of container service results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ContainerService]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class ContainerServiceMasterProfile(msrest.serialization.Model): + """Profile for the container service master. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2017_07_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. + :type dns_prefix: str + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. + :type first_consecutive_static_ip: str + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". + :type storage_profile: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceStorageProfileTypes + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + """ + + _validation = { + 'dns_prefix': {'required': True}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceMasterProfile, self).__init__(**kwargs) + self.count = kwargs.get('count', "1") + self.dns_prefix = kwargs['dns_prefix'] + self.vm_size = kwargs['vm_size'] + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") + self.storage_profile = kwargs.get('storage_profile', None) + self.fqdn = None + + +class ContainerServiceOrchestratorProfile(msrest.serialization.Model): + """Profile for the container service orchestrator. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator_type: Required. The orchestrator to use to manage container service cluster + resources. Valid values are Kubernetes, Swarm, DCOS, DockerCE and Custom. Possible values + include: "Kubernetes", "Swarm", "DCOS", "DockerCE", "Custom". + :type orchestrator_type: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceOrchestratorTypes + :param orchestrator_version: The version of the orchestrator to use. You can specify the + major.minor.patch part of the actual version.For example, you can specify version as "1.6.11". + :type orchestrator_version: str + """ + + _validation = { + 'orchestrator_type': {'required': True}, + } + + _attribute_map = { + 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceOrchestratorProfile, self).__init__(**kwargs) + self.orchestrator_type = kwargs['orchestrator_type'] + self.orchestrator_version = kwargs.get('orchestrator_version', None) + + +class ContainerServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. Either secret or keyVaultSecretRef must be specified. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The ID for the service principal. + :type client_id: str + :param secret: The secret password associated with the service principal in plain text. + :type secret: str + :param key_vault_secret_ref: Reference to a secret stored in Azure Key Vault. + :type key_vault_secret_ref: ~azure.mgmt.containerservice.v2017_07_01.models.KeyVaultSecretRef + """ + + _validation = { + 'client_id': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + 'key_vault_secret_ref': {'key': 'keyVaultSecretRef', 'type': 'KeyVaultSecretRef'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServicePrincipalProfile, self).__init__(**kwargs) + self.client_id = kwargs['client_id'] + self.secret = kwargs.get('secret', None) + self.key_vault_secret_ref = kwargs.get('key_vault_secret_ref', None) + + +class ContainerServiceSshConfiguration(msrest.serialization.Model): + """SSH configuration for Linux-based VMs running on Azure. + + All required parameters must be populated in order to send to Azure. + + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. Only expect one key specified. + :type public_keys: + list[~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceSshPublicKey] + """ + + _validation = { + 'public_keys': {'required': True}, + } + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceSshConfiguration, self).__init__(**kwargs) + self.public_keys = kwargs['public_keys'] + + +class ContainerServiceSshPublicKey(msrest.serialization.Model): + """Contains information about SSH certificate public key data. + + All required parameters must be populated in order to send to Azure. + + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. + :type key_data: str + """ + + _validation = { + 'key_data': {'required': True}, + } + + _attribute_map = { + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceSshPublicKey, self).__init__(**kwargs) + self.key_data = kwargs['key_data'] + + +class ContainerServiceVMDiagnostics(msrest.serialization.Model): + """Profile for diagnostics on the container service VMs. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. + :type enabled: bool + :ivar storage_uri: The URI of the storage account where diagnostics are stored. + :vartype storage_uri: str + """ + + _validation = { + 'enabled': {'required': True}, + 'storage_uri': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) + self.enabled = kwargs['enabled'] + self.storage_uri = None + + +class ContainerServiceWindowsProfile(msrest.serialization.Model): + """Profile for Windows VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for Windows VMs. + :type admin_username: str + :param admin_password: Required. The administrator password to use for Windows VMs. + :type admin_password: str + """ + + _validation = { + 'admin_username': {'required': True, 'pattern': r'^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$'}, + 'admin_password': {'required': True, 'pattern': r'^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$'}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceWindowsProfile, self).__init__(**kwargs) + self.admin_username = kwargs['admin_username'] + self.admin_password = kwargs['admin_password'] + + +class KeyVaultSecretRef(msrest.serialization.Model): + """Reference to a secret stored in Azure Key Vault. + + All required parameters must be populated in order to send to Azure. + + :param vault_id: Required. Key vault identifier. + :type vault_id: str + :param secret_name: Required. The secret name. + :type secret_name: str + :param version: The secret version. + :type version: str + """ + + _validation = { + 'vault_id': {'required': True}, + 'secret_name': {'required': True}, + } + + _attribute_map = { + 'vault_id': {'key': 'vaultID', 'type': 'str'}, + 'secret_name': {'key': 'secretName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultSecretRef, self).__init__(**kwargs) + self.vault_id = kwargs['vault_id'] + self.secret_name = kwargs['secret_name'] + self.version = kwargs.get('version', None) + + +class OrchestratorProfile(msrest.serialization.Model): + """Contains information about orchestrator. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator_type: Orchestrator type. + :type orchestrator_type: str + :param orchestrator_version: Required. Orchestrator version (major, minor, patch). + :type orchestrator_version: str + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _validation = { + 'orchestrator_version': {'required': True}, + } + + _attribute_map = { + 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(OrchestratorProfile, self).__init__(**kwargs) + self.orchestrator_type = kwargs.get('orchestrator_type', None) + self.orchestrator_version = kwargs['orchestrator_version'] + self.is_preview = kwargs.get('is_preview', None) + + +class OrchestratorVersionProfile(msrest.serialization.Model): + """The profile of an orchestrator and its available versions. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator_type: Required. Orchestrator type. + :type orchestrator_type: str + :param orchestrator_version: Required. Orchestrator version (major, minor, patch). + :type orchestrator_version: str + :param default: Installed by default if version is not specified. + :type default: bool + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + :param upgrades: The list of available upgrade versions. + :type upgrades: list[~azure.mgmt.containerservice.v2017_07_01.models.OrchestratorProfile] + """ + + _validation = { + 'orchestrator_type': {'required': True}, + 'orchestrator_version': {'required': True}, + } + + _attribute_map = { + 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'default': {'key': 'default', 'type': 'bool'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + 'upgrades': {'key': 'upgrades', 'type': '[OrchestratorProfile]'}, + } + + def __init__( + self, + **kwargs + ): + super(OrchestratorVersionProfile, self).__init__(**kwargs) + self.orchestrator_type = kwargs['orchestrator_type'] + self.orchestrator_version = kwargs['orchestrator_version'] + self.default = kwargs.get('default', None) + self.is_preview = kwargs.get('is_preview', None) + self.upgrades = kwargs.get('upgrades', None) + + +class OrchestratorVersionProfileListResult(msrest.serialization.Model): + """The list of versions for supported orchestrators. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Id of the orchestrator version profile list result. + :vartype id: str + :ivar name: Name of the orchestrator version profile list result. + :vartype name: str + :ivar type: Type of the orchestrator version profile list result. + :vartype type: str + :param orchestrators: Required. List of orchestrator version profiles. + :type orchestrators: + list[~azure.mgmt.containerservice.v2017_07_01.models.OrchestratorVersionProfile] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'orchestrators': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'orchestrators': {'key': 'properties.orchestrators', 'type': '[OrchestratorVersionProfile]'}, + } + + def __init__( + self, + **kwargs + ): + super(OrchestratorVersionProfileListResult, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.orchestrators = kwargs['orchestrators'] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/_models_py3.py new file mode 100755 index 00000000000..ee4699aca38 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/models/_models_py3.py @@ -0,0 +1,881 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Dict, List, Optional, Union + +import msrest.serialization + +from ._container_service_client_enums import * + + +class Resource(msrest.serialization.Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ContainerService(Resource): + """Container service. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param orchestrator_profile: Profile for the container service orchestrator. + :type orchestrator_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceOrchestratorProfile + :param custom_profile: Properties to configure a custom container service cluster. + :type custom_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceCustomProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. Exact one of secret or keyVaultSecretRef need to be + specified. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServicePrincipalProfile + :param master_profile: Profile for the container service master. + :type master_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceMasterProfile + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceAgentPoolProfile] + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceWindowsProfile + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceLinuxProfile + :param diagnostics_profile: Profile for diagnostics in the container service cluster. + :type diagnostics_profile: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceDiagnosticsProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'orchestrator_profile': {'key': 'properties.orchestratorProfile', 'type': 'ContainerServiceOrchestratorProfile'}, + 'custom_profile': {'key': 'properties.customProfile', 'type': 'ContainerServiceCustomProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ContainerServicePrincipalProfile'}, + 'master_profile': {'key': 'properties.masterProfile', 'type': 'ContainerServiceMasterProfile'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ContainerServiceAgentPoolProfile]'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ContainerServiceWindowsProfile'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'diagnostics_profile': {'key': 'properties.diagnosticsProfile', 'type': 'ContainerServiceDiagnosticsProfile'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + orchestrator_profile: Optional["ContainerServiceOrchestratorProfile"] = None, + custom_profile: Optional["ContainerServiceCustomProfile"] = None, + service_principal_profile: Optional["ContainerServicePrincipalProfile"] = None, + master_profile: Optional["ContainerServiceMasterProfile"] = None, + agent_pool_profiles: Optional[List["ContainerServiceAgentPoolProfile"]] = None, + windows_profile: Optional["ContainerServiceWindowsProfile"] = None, + linux_profile: Optional["ContainerServiceLinuxProfile"] = None, + diagnostics_profile: Optional["ContainerServiceDiagnosticsProfile"] = None, + **kwargs + ): + super(ContainerService, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.orchestrator_profile = orchestrator_profile + self.custom_profile = custom_profile + self.service_principal_profile = service_principal_profile + self.master_profile = master_profile + self.agent_pool_profiles = agent_pool_profiles + self.windows_profile = windows_profile + self.linux_profile = linux_profile + self.diagnostics_profile = diagnostics_profile + + +class ContainerServiceAgentPoolProfile(msrest.serialization.Model): + """Profile for the container service agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Unique name of the agent pool profile in the context of the subscription + and resource group. + :type name: str + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 1 to 100 (inclusive). The default value is 1. + :type count: int + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param dns_prefix: DNS prefix to be used to create the FQDN for the agent pool. + :type dns_prefix: str + :ivar fqdn: FQDN for the agent pool. + :vartype fqdn: str + :param ports: Ports number array used to expose on this agent pool. The default opened ports + are different based on your choice of orchestrator. + :type ports: list[int] + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". + :type storage_profile: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceStorageProfileTypes + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2017_07_01.models.OSType + """ + + _validation = { + 'name': {'required': True}, + 'count': {'maximum': 100, 'minimum': 1}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[int]'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + vm_size: Union[str, "ContainerServiceVMSizeTypes"], + count: Optional[int] = 1, + os_disk_size_gb: Optional[int] = None, + dns_prefix: Optional[str] = None, + ports: Optional[List[int]] = None, + storage_profile: Optional[Union[str, "ContainerServiceStorageProfileTypes"]] = None, + vnet_subnet_id: Optional[str] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + **kwargs + ): + super(ContainerServiceAgentPoolProfile, self).__init__(**kwargs) + self.name = name + self.count = count + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.dns_prefix = dns_prefix + self.fqdn = None + self.ports = ports + self.storage_profile = storage_profile + self.vnet_subnet_id = vnet_subnet_id + self.os_type = os_type + + +class ContainerServiceCustomProfile(msrest.serialization.Model): + """Properties to configure a custom container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator: Required. The name of the custom orchestrator to use. + :type orchestrator: str + """ + + _validation = { + 'orchestrator': {'required': True}, + } + + _attribute_map = { + 'orchestrator': {'key': 'orchestrator', 'type': 'str'}, + } + + def __init__( + self, + *, + orchestrator: str, + **kwargs + ): + super(ContainerServiceCustomProfile, self).__init__(**kwargs) + self.orchestrator = orchestrator + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): + """Profile for diagnostics on the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. + :type vm_diagnostics: + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceVMDiagnostics + """ + + _validation = { + 'vm_diagnostics': {'required': True}, + } + + _attribute_map = { + 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, + } + + def __init__( + self, + *, + vm_diagnostics: "ContainerServiceVMDiagnostics", + **kwargs + ): + super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) + self.vm_diagnostics = vm_diagnostics + + +class ContainerServiceLinuxProfile(msrest.serialization.Model): + """Profile for Linux VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for Linux VMs. + :type admin_username: str + :param ssh: Required. SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceSshConfiguration + """ + + _validation = { + 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, + 'ssh': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, + } + + def __init__( + self, + *, + admin_username: str, + ssh: "ContainerServiceSshConfiguration", + **kwargs + ): + super(ContainerServiceLinuxProfile, self).__init__(**kwargs) + self.admin_username = admin_username + self.ssh = ssh + + +class ContainerServiceListResult(msrest.serialization.Model): + """The response from the List Container Services operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of container services. + :type value: list[~azure.mgmt.containerservice.v2017_07_01.models.ContainerService] + :ivar next_link: The URL to get the next set of container service results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ContainerService]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ContainerService"]] = None, + **kwargs + ): + super(ContainerServiceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ContainerServiceMasterProfile(msrest.serialization.Model): + """Profile for the container service master. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2017_07_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. + :type dns_prefix: str + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. + :type first_consecutive_static_ip: str + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". + :type storage_profile: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceStorageProfileTypes + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + """ + + _validation = { + 'dns_prefix': {'required': True}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + } + + def __init__( + self, + *, + dns_prefix: str, + vm_size: Union[str, "ContainerServiceVMSizeTypes"], + count: Optional[Union[int, "Count"]] = "1", + os_disk_size_gb: Optional[int] = None, + vnet_subnet_id: Optional[str] = None, + first_consecutive_static_ip: Optional[str] = "10.240.255.5", + storage_profile: Optional[Union[str, "ContainerServiceStorageProfileTypes"]] = None, + **kwargs + ): + super(ContainerServiceMasterProfile, self).__init__(**kwargs) + self.count = count + self.dns_prefix = dns_prefix + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.vnet_subnet_id = vnet_subnet_id + self.first_consecutive_static_ip = first_consecutive_static_ip + self.storage_profile = storage_profile + self.fqdn = None + + +class ContainerServiceOrchestratorProfile(msrest.serialization.Model): + """Profile for the container service orchestrator. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator_type: Required. The orchestrator to use to manage container service cluster + resources. Valid values are Kubernetes, Swarm, DCOS, DockerCE and Custom. Possible values + include: "Kubernetes", "Swarm", "DCOS", "DockerCE", "Custom". + :type orchestrator_type: str or + ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceOrchestratorTypes + :param orchestrator_version: The version of the orchestrator to use. You can specify the + major.minor.patch part of the actual version.For example, you can specify version as "1.6.11". + :type orchestrator_version: str + """ + + _validation = { + 'orchestrator_type': {'required': True}, + } + + _attribute_map = { + 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + orchestrator_type: Union[str, "ContainerServiceOrchestratorTypes"], + orchestrator_version: Optional[str] = None, + **kwargs + ): + super(ContainerServiceOrchestratorProfile, self).__init__(**kwargs) + self.orchestrator_type = orchestrator_type + self.orchestrator_version = orchestrator_version + + +class ContainerServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. Either secret or keyVaultSecretRef must be specified. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The ID for the service principal. + :type client_id: str + :param secret: The secret password associated with the service principal in plain text. + :type secret: str + :param key_vault_secret_ref: Reference to a secret stored in Azure Key Vault. + :type key_vault_secret_ref: ~azure.mgmt.containerservice.v2017_07_01.models.KeyVaultSecretRef + """ + + _validation = { + 'client_id': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + 'key_vault_secret_ref': {'key': 'keyVaultSecretRef', 'type': 'KeyVaultSecretRef'}, + } + + def __init__( + self, + *, + client_id: str, + secret: Optional[str] = None, + key_vault_secret_ref: Optional["KeyVaultSecretRef"] = None, + **kwargs + ): + super(ContainerServicePrincipalProfile, self).__init__(**kwargs) + self.client_id = client_id + self.secret = secret + self.key_vault_secret_ref = key_vault_secret_ref + + +class ContainerServiceSshConfiguration(msrest.serialization.Model): + """SSH configuration for Linux-based VMs running on Azure. + + All required parameters must be populated in order to send to Azure. + + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. Only expect one key specified. + :type public_keys: + list[~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceSshPublicKey] + """ + + _validation = { + 'public_keys': {'required': True}, + } + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, + } + + def __init__( + self, + *, + public_keys: List["ContainerServiceSshPublicKey"], + **kwargs + ): + super(ContainerServiceSshConfiguration, self).__init__(**kwargs) + self.public_keys = public_keys + + +class ContainerServiceSshPublicKey(msrest.serialization.Model): + """Contains information about SSH certificate public key data. + + All required parameters must be populated in order to send to Azure. + + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. + :type key_data: str + """ + + _validation = { + 'key_data': {'required': True}, + } + + _attribute_map = { + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__( + self, + *, + key_data: str, + **kwargs + ): + super(ContainerServiceSshPublicKey, self).__init__(**kwargs) + self.key_data = key_data + + +class ContainerServiceVMDiagnostics(msrest.serialization.Model): + """Profile for diagnostics on the container service VMs. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. + :type enabled: bool + :ivar storage_uri: The URI of the storage account where diagnostics are stored. + :vartype storage_uri: str + """ + + _validation = { + 'enabled': {'required': True}, + 'storage_uri': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__( + self, + *, + enabled: bool, + **kwargs + ): + super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) + self.enabled = enabled + self.storage_uri = None + + +class ContainerServiceWindowsProfile(msrest.serialization.Model): + """Profile for Windows VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for Windows VMs. + :type admin_username: str + :param admin_password: Required. The administrator password to use for Windows VMs. + :type admin_password: str + """ + + _validation = { + 'admin_username': {'required': True, 'pattern': r'^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$'}, + 'admin_password': {'required': True, 'pattern': r'^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$'}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + } + + def __init__( + self, + *, + admin_username: str, + admin_password: str, + **kwargs + ): + super(ContainerServiceWindowsProfile, self).__init__(**kwargs) + self.admin_username = admin_username + self.admin_password = admin_password + + +class KeyVaultSecretRef(msrest.serialization.Model): + """Reference to a secret stored in Azure Key Vault. + + All required parameters must be populated in order to send to Azure. + + :param vault_id: Required. Key vault identifier. + :type vault_id: str + :param secret_name: Required. The secret name. + :type secret_name: str + :param version: The secret version. + :type version: str + """ + + _validation = { + 'vault_id': {'required': True}, + 'secret_name': {'required': True}, + } + + _attribute_map = { + 'vault_id': {'key': 'vaultID', 'type': 'str'}, + 'secret_name': {'key': 'secretName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + *, + vault_id: str, + secret_name: str, + version: Optional[str] = None, + **kwargs + ): + super(KeyVaultSecretRef, self).__init__(**kwargs) + self.vault_id = vault_id + self.secret_name = secret_name + self.version = version + + +class OrchestratorProfile(msrest.serialization.Model): + """Contains information about orchestrator. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator_type: Orchestrator type. + :type orchestrator_type: str + :param orchestrator_version: Required. Orchestrator version (major, minor, patch). + :type orchestrator_version: str + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _validation = { + 'orchestrator_version': {'required': True}, + } + + _attribute_map = { + 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + *, + orchestrator_version: str, + orchestrator_type: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): + super(OrchestratorProfile, self).__init__(**kwargs) + self.orchestrator_type = orchestrator_type + self.orchestrator_version = orchestrator_version + self.is_preview = is_preview + + +class OrchestratorVersionProfile(msrest.serialization.Model): + """The profile of an orchestrator and its available versions. + + All required parameters must be populated in order to send to Azure. + + :param orchestrator_type: Required. Orchestrator type. + :type orchestrator_type: str + :param orchestrator_version: Required. Orchestrator version (major, minor, patch). + :type orchestrator_version: str + :param default: Installed by default if version is not specified. + :type default: bool + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + :param upgrades: The list of available upgrade versions. + :type upgrades: list[~azure.mgmt.containerservice.v2017_07_01.models.OrchestratorProfile] + """ + + _validation = { + 'orchestrator_type': {'required': True}, + 'orchestrator_version': {'required': True}, + } + + _attribute_map = { + 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'default': {'key': 'default', 'type': 'bool'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + 'upgrades': {'key': 'upgrades', 'type': '[OrchestratorProfile]'}, + } + + def __init__( + self, + *, + orchestrator_type: str, + orchestrator_version: str, + default: Optional[bool] = None, + is_preview: Optional[bool] = None, + upgrades: Optional[List["OrchestratorProfile"]] = None, + **kwargs + ): + super(OrchestratorVersionProfile, self).__init__(**kwargs) + self.orchestrator_type = orchestrator_type + self.orchestrator_version = orchestrator_version + self.default = default + self.is_preview = is_preview + self.upgrades = upgrades + + +class OrchestratorVersionProfileListResult(msrest.serialization.Model): + """The list of versions for supported orchestrators. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Id of the orchestrator version profile list result. + :vartype id: str + :ivar name: Name of the orchestrator version profile list result. + :vartype name: str + :ivar type: Type of the orchestrator version profile list result. + :vartype type: str + :param orchestrators: Required. List of orchestrator version profiles. + :type orchestrators: + list[~azure.mgmt.containerservice.v2017_07_01.models.OrchestratorVersionProfile] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'orchestrators': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'orchestrators': {'key': 'properties.orchestrators', 'type': '[OrchestratorVersionProfile]'}, + } + + def __init__( + self, + *, + orchestrators: List["OrchestratorVersionProfile"], + **kwargs + ): + super(OrchestratorVersionProfileListResult, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.orchestrators = orchestrators diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/operations/__init__.py new file mode 100755 index 00000000000..db0e90a3a5a --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/operations/__init__.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._container_services_operations import ContainerServicesOperations + +__all__ = [ + 'ContainerServicesOperations', +] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/operations/_container_services_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/operations/_container_services_operations.py new file mode 100755 index 00000000000..93392d039d2 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2017_07_01/operations/_container_services_operations.py @@ -0,0 +1,573 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ContainerServicesOperations(object): + """ContainerServicesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2017_07_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ContainerServiceListResult"] + """Gets a list of container services in the specified subscription. + + Gets a list of container services in the specified subscription. The operation returns + properties of each container service including state, orchestrator, number of masters and + agents, and FQDNs of masters and agents. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ContainerServiceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerServiceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ContainerServiceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + container_service_name, # type: str + parameters, # type: "_models.ContainerService" + **kwargs # type: Any + ): + # type: (...) -> "_models.ContainerService" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ContainerService') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ContainerService', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ContainerService', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ContainerService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + container_service_name, # type: str + parameters, # type: "_models.ContainerService" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ContainerService"] + """Creates or updates a container service. + + Creates or updates a container service with the specified configuration of orchestrator, + masters, and agents. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param container_service_name: The name of the container service in the specified subscription + and resource group. + :type container_service_name: str + :param parameters: Parameters supplied to the Create or Update a Container Service operation. + :type parameters: ~azure.mgmt.containerservice.v2017_07_01.models.ContainerService + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ContainerService or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2017_07_01.models.ContainerService] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerService"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + container_service_name=container_service_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ContainerService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + container_service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ContainerService" + """Gets the properties of the specified container service. + + Gets the properties of the specified container service in the specified subscription and + resource group. The operation returns the properties including state, orchestrator, number of + masters and agents, and FQDNs of masters and agents. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param container_service_name: The name of the container service in the specified subscription + and resource group. + :type container_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ContainerService, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2017_07_01.models.ContainerService + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ContainerService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + container_service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + container_service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified container service. + + Deletes the specified container service in the specified subscription and resource group. The + operation does not delete other resources created as part of creating a container service, + including storage accounts, VMs, and availability sets. All the other resources created with + the container service are part of the same resource group and can be deleted individually. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param container_service_name: The name of the container service in the specified subscription + and resource group. + :type container_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + container_service_name=container_service_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerServiceName': self._serialize.url("container_service_name", container_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ContainerServiceListResult"] + """Gets a list of container services in the specified resource group. + + Gets a list of container services in the specified subscription and resource group. The + operation returns properties of each container service including state, orchestrator, number of + masters and agents, and FQDNs of masters and agents. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ContainerServiceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerServiceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ContainerServiceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices'} # type: ignore + + def list_orchestrators( + self, + location, # type: str + resource_type=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.OrchestratorVersionProfileListResult" + """Gets a list of supported orchestrators in the specified subscription. + + Gets a list of supported orchestrators in the specified subscription. The operation returns + properties of each orchestrator including version, available upgrades and whether that version + or upgrades are in preview. + + :param location: The name of a supported Azure region. + :type location: str + :param resource_type: resource type for which the list of orchestrators needs to be returned. + :type resource_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OrchestratorVersionProfileListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2017_07_01.models.OrchestratorVersionProfileListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrchestratorVersionProfileListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.list_orchestrators.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if resource_type is not None: + query_parameters['resource-type'] = self._serialize.query("resource_type", resource_type, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OrchestratorVersionProfileListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_orchestrators.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/container_service_client.py deleted file mode 100644 index c10bfe67196..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/container_service_client.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.managed_clusters_operations import ManagedClustersOperations -from . import models - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2018_08_01_preview.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2018_08_01_preview.operations.ManagedClustersOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-08-01-preview' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/__init__.py deleted file mode 100644 index b130d1e5eff..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/__init__.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from .operation_value_py3 import OperationValue - from .resource_py3 import Resource - from .tags_object_py3 import TagsObject - from .managed_cluster_service_principal_profile_py3 import ManagedClusterServicePrincipalProfile - from .container_service_master_profile_py3 import ContainerServiceMasterProfile - from .managed_cluster_agent_pool_profile_py3 import ManagedClusterAgentPoolProfile - from .container_service_windows_profile_py3 import ContainerServiceWindowsProfile - from .container_service_ssh_public_key_py3 import ContainerServiceSshPublicKey - from .container_service_ssh_configuration_py3 import ContainerServiceSshConfiguration - from .container_service_linux_profile_py3 import ContainerServiceLinuxProfile - from .container_service_network_profile_py3 import ContainerServiceNetworkProfile - from .container_service_vm_diagnostics_py3 import ContainerServiceVMDiagnostics - from .container_service_diagnostics_profile_py3 import ContainerServiceDiagnosticsProfile - from .managed_cluster_addon_profile_py3 import ManagedClusterAddonProfile - from .managed_cluster_aad_profile_py3 import ManagedClusterAADProfile - from .managed_cluster_py3 import ManagedCluster - from .orchestrator_profile_py3 import OrchestratorProfile - from .managed_cluster_access_profile_py3 import ManagedClusterAccessProfile - from .managed_cluster_pool_upgrade_profile_py3 import ManagedClusterPoolUpgradeProfile - from .managed_cluster_upgrade_profile_py3 import ManagedClusterUpgradeProfile - from .credential_result_py3 import CredentialResult - from .credential_results_py3 import CredentialResults -except (SyntaxError, ImportError): - from .operation_value import OperationValue - from .resource import Resource - from .tags_object import TagsObject - from .managed_cluster_service_principal_profile import ManagedClusterServicePrincipalProfile - from .container_service_master_profile import ContainerServiceMasterProfile - from .managed_cluster_agent_pool_profile import ManagedClusterAgentPoolProfile - from .container_service_windows_profile import ContainerServiceWindowsProfile - from .container_service_ssh_public_key import ContainerServiceSshPublicKey - from .container_service_ssh_configuration import ContainerServiceSshConfiguration - from .container_service_linux_profile import ContainerServiceLinuxProfile - from .container_service_network_profile import ContainerServiceNetworkProfile - from .container_service_vm_diagnostics import ContainerServiceVMDiagnostics - from .container_service_diagnostics_profile import ContainerServiceDiagnosticsProfile - from .managed_cluster_addon_profile import ManagedClusterAddonProfile - from .managed_cluster_aad_profile import ManagedClusterAADProfile - from .managed_cluster import ManagedCluster - from .orchestrator_profile import OrchestratorProfile - from .managed_cluster_access_profile import ManagedClusterAccessProfile - from .managed_cluster_pool_upgrade_profile import ManagedClusterPoolUpgradeProfile - from .managed_cluster_upgrade_profile import ManagedClusterUpgradeProfile - from .credential_result import CredentialResult - from .credential_results import CredentialResults -from .operation_value_paged import OperationValuePaged -from .managed_cluster_paged import ManagedClusterPaged -from .container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, - NetworkPlugin, - NetworkPolicy, -) - -__all__ = [ - 'OperationValue', - 'Resource', - 'TagsObject', - 'ManagedClusterServicePrincipalProfile', - 'ContainerServiceMasterProfile', - 'ManagedClusterAgentPoolProfile', - 'ContainerServiceWindowsProfile', - 'ContainerServiceSshPublicKey', - 'ContainerServiceSshConfiguration', - 'ContainerServiceLinuxProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceVMDiagnostics', - 'ContainerServiceDiagnosticsProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAADProfile', - 'ManagedCluster', - 'OrchestratorProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterUpgradeProfile', - 'CredentialResult', - 'CredentialResults', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', - 'NetworkPlugin', - 'NetworkPolicy', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_client_enums.py deleted file mode 100644 index f6d7bf60bf4..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_client_enums.py +++ /dev/null @@ -1,219 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_diagnostics_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_diagnostics_profile.py deleted file mode 100644 index f972906b79f..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_diagnostics_profile.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_diagnostics_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_diagnostics_profile_py3.py deleted file mode 100644 index 6684912319a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_diagnostics_profile_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_linux_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_linux_profile.py deleted file mode 100644 index 8143d72a672..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_linux_profile.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_linux_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_linux_profile_py3.py deleted file mode 100644 index e1fc61c8914..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_linux_profile_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_master_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_master_profile.py deleted file mode 100644 index 927a55304d0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_master_profile.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_master_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_master_profile_py3.py deleted file mode 100644 index 215e111082b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_master_profile_py3.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_network_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_network_profile.py deleted file mode 100644 index d1be0f459ac..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_network_profile.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico' - :type network_policy: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_network_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_network_profile_py3.py deleted file mode 100644 index e00659a9df5..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_network_profile_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico' - :type network_policy: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_configuration.py deleted file mode 100644 index 936c49ab349..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_configuration.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_configuration_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_configuration_py3.py deleted file mode 100644 index 86e22820dbf..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_configuration_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_public_key.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_public_key.py deleted file mode 100644 index da7609ba222..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_public_key.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_public_key_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_public_key_py3.py deleted file mode 100644 index 8e8c10544ef..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_ssh_public_key_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_vm_diagnostics.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_vm_diagnostics.py deleted file mode 100644 index f1804c66b68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_vm_diagnostics.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_vm_diagnostics_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_vm_diagnostics_py3.py deleted file mode 100644 index a716fc26954..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_vm_diagnostics_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_windows_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_windows_profile.py deleted file mode 100644 index 463253c6d6a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_windows_profile.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: Required. The administrator password to use for - Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$'}, - 'admin_password': {'required': True, 'pattern': r'^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$'}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_windows_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_windows_profile_py3.py deleted file mode 100644 index 667c96367aa..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/container_service_windows_profile_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: Required. The administrator password to use for - Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$'}, - 'admin_password': {'required': True, 'pattern': r'^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$'}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str, **kwargs) -> None: - super(ContainerServiceWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_result.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_result.py deleted file mode 100644 index 89e748b481b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_result.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_result_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_result_py3.py deleted file mode 100644 index 6f387834bf0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_result_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_results.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_results.py deleted file mode 100644 index 2d6869b53be..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_results.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2018_08_01_preview.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_results_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_results_py3.py deleted file mode 100644 index a1d0853e0de..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/credential_results_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2018_08_01_preview.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster.py deleted file mode 100644 index 8864f98b7a6..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceLinuxProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterAddonProfile] - :ivar node_resource_group: Name of the resource group containing agent - pool nodes. - :vartype node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterAADProfile - :param api_server_authorized_ip_ranges: Authorized IP Ranges to kubernetes - API server. - :type api_server_authorized_ip_ranges: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'node_resource_group': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_authorized_ip_ranges': {'key': 'properties.apiServerAuthorizedIPRanges', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = None - self.enable_rbac = kwargs.get('enable_rbac', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.api_server_authorized_ip_ranges = kwargs.get('api_server_authorized_ip_ranges', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_aad_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_aad_profile.py deleted file mode 100644 index 6a48639de34..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_aad_profile.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_aad_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_aad_profile_py3.py deleted file mode 100644 index 76289f3ddc3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_aad_profile_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_access_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_access_profile.py deleted file mode 100644 index 6dc2a4ec23b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_access_profile.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_access_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_access_profile_py3.py deleted file mode 100644 index 0d3fb998e97..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_access_profile_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_addon_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_addon_profile.py deleted file mode 100644 index 796f9246a68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_addon_profile.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_addon_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_addon_profile_py3.py deleted file mode 100644 index 71e05cd14c0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_addon_profile_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_agent_pool_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_agent_pool_profile.py deleted file mode 100644 index de4cb740d6c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_agent_pool_profile.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAgentPoolProfile(Model): - """Profile for the container service agent pool. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.AgentPoolType - """ - - _validation = { - 'name': {'required': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_agent_pool_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_agent_pool_profile_py3.py deleted file mode 100644 index 46a260aa73c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_agent_pool_profile_py3.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAgentPoolProfile(Model): - """Profile for the container service agent pool. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.AgentPoolType - """ - - _validation = { - 'name': {'required': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = name - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_paged.py deleted file mode 100644 index 3e57bbc42ec..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_pool_upgrade_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_pool_upgrade_profile.py deleted file mode 100644 index 988132b10b4..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_pool_upgrade_profile.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: list[str] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_pool_upgrade_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_pool_upgrade_profile_py3.py deleted file mode 100644 index 9eae9ae9fed..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_pool_upgrade_profile_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2018_08_01_preview.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: list[str] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[str]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_py3.py deleted file mode 100644 index 04d1589d118..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_py3.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceLinuxProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterAddonProfile] - :ivar node_resource_group: Name of the resource group containing agent - pool nodes. - :vartype node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterAADProfile - :param api_server_authorized_ip_ranges: Authorized IP Ranges to kubernetes - API server. - :type api_server_authorized_ip_ranges: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'node_resource_group': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_authorized_ip_ranges': {'key': 'properties.apiServerAuthorizedIPRanges', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, service_principal_profile=None, addon_profiles=None, enable_rbac: bool=None, network_profile=None, aad_profile=None, api_server_authorized_ip_ranges=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = None - self.enable_rbac = enable_rbac - self.network_profile = network_profile - self.aad_profile = aad_profile - self.api_server_authorized_ip_ranges = api_server_authorized_ip_ranges diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_service_principal_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_service_principal_profile.py deleted file mode 100644 index 4610cedac54..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_service_principal_profile.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_service_principal_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_service_principal_profile_py3.py deleted file mode 100644 index 6ea9e92dc40..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_service_principal_profile_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_upgrade_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_upgrade_profile.py deleted file mode 100644 index b4a98f4cd2a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_upgrade_profile.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_upgrade_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_upgrade_profile_py3.py deleted file mode 100644 index bed444fa378..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/managed_cluster_upgrade_profile_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/operation_value.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/operation_value.py deleted file mode 100644 index 911f9fc8088..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/operation_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/operation_value_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/operation_value_paged.py deleted file mode 100644 index 47310584f24..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/operation_value_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/operation_value_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/operation_value_py3.py deleted file mode 100644 index 55bceaa7543..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/operation_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/orchestrator_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/orchestrator_profile.py deleted file mode 100644 index d5560a1f879..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/orchestrator_profile.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorProfile(Model): - """Contains information about orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = kwargs.get('orchestrator_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/orchestrator_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/orchestrator_profile_py3.py deleted file mode 100644 index f16e84a1fe3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/orchestrator_profile_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorProfile(Model): - """Contains information about orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - } - - def __init__(self, *, orchestrator_type: str, orchestrator_version: str, **kwargs) -> None: - super(OrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = orchestrator_type - self.orchestrator_version = orchestrator_version diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/resource.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/resource.py deleted file mode 100644 index 5dd7d481c68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/resource_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/resource_py3.py deleted file mode 100644 index 2f3702caf60..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/tags_object.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/tags_object.py deleted file mode 100644 index 2966ec220f9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/tags_object.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/tags_object_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/tags_object_py3.py deleted file mode 100644 index 8be0bb4a15d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/models/tags_object_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/operations/__init__.py deleted file mode 100644 index f517d730f21..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/operations/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .operations import Operations -from .managed_clusters_operations import ManagedClustersOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/operations/managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/operations/managed_clusters_operations.py deleted file mode 100644 index d85b2f9f178..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/operations/managed_clusters_operations.py +++ /dev/null @@ -1,988 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-08-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-08-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.CredentialResults - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.CredentialResults - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/operations/operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/operations/operations.py deleted file mode 100644 index 513e518a911..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/operations/operations.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-08-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-08-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2018_08_01_preview.models.OperationValuePaged[~azure.mgmt.containerservice.v2018_08_01_preview.models.OperationValue] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/container_service_client.py deleted file mode 100644 index 1560293fc87..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/container_service_client.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.managed_clusters_operations import ManagedClustersOperations -from .operations.agent_pools_operations import AgentPoolsOperations -from . import models - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2019_04_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2019_04_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2019_04_01.operations.AgentPoolsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-04-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/__init__.py deleted file mode 100644 index 39f5b2a8516..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/__init__.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from .operation_value_py3 import OperationValue - from .resource_py3 import Resource - from .sub_resource_py3 import SubResource - from .tags_object_py3 import TagsObject - from .managed_cluster_service_principal_profile_py3 import ManagedClusterServicePrincipalProfile - from .container_service_master_profile_py3 import ContainerServiceMasterProfile - from .managed_cluster_agent_pool_profile_properties_py3 import ManagedClusterAgentPoolProfileProperties - from .managed_cluster_agent_pool_profile_py3 import ManagedClusterAgentPoolProfile - from .agent_pool_py3 import AgentPool - from .container_service_windows_profile_py3 import ContainerServiceWindowsProfile - from .container_service_ssh_public_key_py3 import ContainerServiceSshPublicKey - from .container_service_ssh_configuration_py3 import ContainerServiceSshConfiguration - from .container_service_linux_profile_py3 import ContainerServiceLinuxProfile - from .container_service_network_profile_py3 import ContainerServiceNetworkProfile - from .container_service_vm_diagnostics_py3 import ContainerServiceVMDiagnostics - from .container_service_diagnostics_profile_py3 import ContainerServiceDiagnosticsProfile - from .managed_cluster_addon_profile_py3 import ManagedClusterAddonProfile - from .managed_cluster_aad_profile_py3 import ManagedClusterAADProfile - from .managed_cluster_py3 import ManagedCluster - from .orchestrator_profile_py3 import OrchestratorProfile - from .managed_cluster_access_profile_py3 import ManagedClusterAccessProfile - from .managed_cluster_pool_upgrade_profile_py3 import ManagedClusterPoolUpgradeProfile - from .managed_cluster_upgrade_profile_py3 import ManagedClusterUpgradeProfile - from .credential_result_py3 import CredentialResult - from .credential_results_py3 import CredentialResults -except (SyntaxError, ImportError): - from .operation_value import OperationValue - from .resource import Resource - from .sub_resource import SubResource - from .tags_object import TagsObject - from .managed_cluster_service_principal_profile import ManagedClusterServicePrincipalProfile - from .container_service_master_profile import ContainerServiceMasterProfile - from .managed_cluster_agent_pool_profile_properties import ManagedClusterAgentPoolProfileProperties - from .managed_cluster_agent_pool_profile import ManagedClusterAgentPoolProfile - from .agent_pool import AgentPool - from .container_service_windows_profile import ContainerServiceWindowsProfile - from .container_service_ssh_public_key import ContainerServiceSshPublicKey - from .container_service_ssh_configuration import ContainerServiceSshConfiguration - from .container_service_linux_profile import ContainerServiceLinuxProfile - from .container_service_network_profile import ContainerServiceNetworkProfile - from .container_service_vm_diagnostics import ContainerServiceVMDiagnostics - from .container_service_diagnostics_profile import ContainerServiceDiagnosticsProfile - from .managed_cluster_addon_profile import ManagedClusterAddonProfile - from .managed_cluster_aad_profile import ManagedClusterAADProfile - from .managed_cluster import ManagedCluster - from .orchestrator_profile import OrchestratorProfile - from .managed_cluster_access_profile import ManagedClusterAccessProfile - from .managed_cluster_pool_upgrade_profile import ManagedClusterPoolUpgradeProfile - from .managed_cluster_upgrade_profile import ManagedClusterUpgradeProfile - from .credential_result import CredentialResult - from .credential_results import CredentialResults -from .operation_value_paged import OperationValuePaged -from .managed_cluster_paged import ManagedClusterPaged -from .agent_pool_paged import AgentPoolPaged -from .container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, - NetworkPlugin, - NetworkPolicy, -) - -__all__ = [ - 'OperationValue', - 'Resource', - 'SubResource', - 'TagsObject', - 'ManagedClusterServicePrincipalProfile', - 'ContainerServiceMasterProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAgentPoolProfile', - 'AgentPool', - 'ContainerServiceWindowsProfile', - 'ContainerServiceSshPublicKey', - 'ContainerServiceSshConfiguration', - 'ContainerServiceLinuxProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceVMDiagnostics', - 'ContainerServiceDiagnosticsProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAADProfile', - 'ManagedCluster', - 'OrchestratorProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterUpgradeProfile', - 'CredentialResult', - 'CredentialResults', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', - 'NetworkPlugin', - 'NetworkPolicy', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/agent_pool.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/agent_pool.py deleted file mode 100644 index 1f69e099917..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/agent_pool.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/agent_pool_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/agent_pool_paged.py deleted file mode 100644 index 735676ae6cd..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/agent_pool_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/agent_pool_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/agent_pool_py3.py deleted file mode 100644 index 02b032048bd..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/agent_pool_py3.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, orchestrator_version: str=None, availability_zones=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_client_enums.py deleted file mode 100644 index f317ac627e8..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_client_enums.py +++ /dev/null @@ -1,220 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_diagnostics_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_diagnostics_profile.py deleted file mode 100644 index 37bbead4059..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_diagnostics_profile.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_diagnostics_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_diagnostics_profile_py3.py deleted file mode 100644 index 4ea399e1f99..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_diagnostics_profile_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_linux_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_linux_profile.py deleted file mode 100644 index 012838eb379..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_linux_profile.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_linux_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_linux_profile_py3.py deleted file mode 100644 index 26a9774253c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_linux_profile_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_master_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_master_profile.py deleted file mode 100644 index ea2d38fc6c0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_master_profile.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_master_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_master_profile_py3.py deleted file mode 100644 index d8171032206..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_master_profile_py3.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_network_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_network_profile.py deleted file mode 100644 index 76b392f717a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_network_profile.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2019_02_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2019_02_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_network_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_network_profile_py3.py deleted file mode 100644 index be9c2df79d8..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_network_profile_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2019_02_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2019_02_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_configuration.py deleted file mode 100644 index 540b259c4df..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_configuration.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_configuration_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_configuration_py3.py deleted file mode 100644 index 4e33bee7e14..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_configuration_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_public_key.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_public_key.py deleted file mode 100644 index da7609ba222..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_public_key.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_public_key_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_public_key_py3.py deleted file mode 100644 index 8e8c10544ef..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_ssh_public_key_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_vm_diagnostics.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_vm_diagnostics.py deleted file mode 100644 index f1804c66b68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_vm_diagnostics.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_vm_diagnostics_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_vm_diagnostics_py3.py deleted file mode 100644 index a716fc26954..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_vm_diagnostics_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_windows_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_windows_profile.py deleted file mode 100644 index 463253c6d6a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_windows_profile.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: Required. The administrator password to use for - Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$'}, - 'admin_password': {'required': True, 'pattern': r'^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$'}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_windows_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_windows_profile_py3.py deleted file mode 100644 index 667c96367aa..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/container_service_windows_profile_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: Required. The administrator password to use for - Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$'}, - 'admin_password': {'required': True, 'pattern': r'^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$'}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str, **kwargs) -> None: - super(ContainerServiceWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_result.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_result.py deleted file mode 100644 index 89e748b481b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_result.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_result_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_result_py3.py deleted file mode 100644 index 6f387834bf0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_result_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_results.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_results.py deleted file mode 100644 index 274a4df3b8f..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_results.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2019_02_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_results_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_results_py3.py deleted file mode 100644 index 7cab1b12c0d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/credential_results_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2019_02_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster.py deleted file mode 100644 index c12c487ee22..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceLinuxProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterAddonProfile] - :ivar node_resource_group: Name of the resource group containing agent - pool nodes. - :vartype node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterAADProfile - :param api_server_authorized_ip_ranges: (PREVIEW) Authorized IP Ranges to - kubernetes API server. - :type api_server_authorized_ip_ranges: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'node_resource_group': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_authorized_ip_ranges': {'key': 'properties.apiServerAuthorizedIPRanges', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = None - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.api_server_authorized_ip_ranges = kwargs.get('api_server_authorized_ip_ranges', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_aad_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_aad_profile.py deleted file mode 100644 index 6a48639de34..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_aad_profile.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_aad_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_aad_profile_py3.py deleted file mode 100644 index 76289f3ddc3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_aad_profile_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_access_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_access_profile.py deleted file mode 100644 index 6dc2a4ec23b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_access_profile.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_access_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_access_profile_py3.py deleted file mode 100644 index 0d3fb998e97..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_access_profile_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_addon_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_addon_profile.py deleted file mode 100644 index 796f9246a68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_addon_profile.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_addon_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_addon_profile_py3.py deleted file mode 100644 index 71e05cd14c0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_addon_profile_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile.py deleted file mode 100644 index e4c698b89b9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile.py +++ /dev/null @@ -1,144 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .managed_cluster_agent_pool_profile_properties import ManagedClusterAgentPoolProfileProperties - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile_properties.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile_properties.py deleted file mode 100644 index 89b53b327f3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile_properties.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile_properties_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile_properties_py3.py deleted file mode 100644 index 62998e7567c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile_properties_py3.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile_py3.py deleted file mode 100644 index ce5c18a44c4..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_agent_pool_profile_py3.py +++ /dev/null @@ -1,144 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .managed_cluster_agent_pool_profile_properties_py3 import ManagedClusterAgentPoolProfileProperties - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, vm_size, name: str, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, orchestrator_version=orchestrator_version, availability_zones=availability_zones, **kwargs) - self.name = name diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_paged.py deleted file mode 100644 index e5101f5ce01..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_pool_upgrade_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_pool_upgrade_profile.py deleted file mode 100644 index 2bbb3b98c17..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_pool_upgrade_profile.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: list[str] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_pool_upgrade_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_pool_upgrade_profile_py3.py deleted file mode 100644 index a15ac63f436..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_pool_upgrade_profile_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: list[str] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[str]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_py3.py deleted file mode 100644 index 1c8a3919a80..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_py3.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceLinuxProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterAddonProfile] - :ivar node_resource_group: Name of the resource group containing agent - pool nodes. - :vartype node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterAADProfile - :param api_server_authorized_ip_ranges: (PREVIEW) Authorized IP Ranges to - kubernetes API server. - :type api_server_authorized_ip_ranges: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'node_resource_group': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_authorized_ip_ranges': {'key': 'properties.apiServerAuthorizedIPRanges', 'type': '[str]'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, service_principal_profile=None, addon_profiles=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, api_server_authorized_ip_ranges=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = None - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.api_server_authorized_ip_ranges = api_server_authorized_ip_ranges diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_service_principal_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_service_principal_profile.py deleted file mode 100644 index 4610cedac54..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_service_principal_profile.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_service_principal_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_service_principal_profile_py3.py deleted file mode 100644 index 6ea9e92dc40..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_service_principal_profile_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_upgrade_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_upgrade_profile.py deleted file mode 100644 index 6123fe02156..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_upgrade_profile.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_upgrade_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_upgrade_profile_py3.py deleted file mode 100644 index 5e9cc664a75..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/managed_cluster_upgrade_profile_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/operation_value.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/operation_value.py deleted file mode 100644 index 911f9fc8088..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/operation_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/operation_value_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/operation_value_paged.py deleted file mode 100644 index 54db1b44228..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/operation_value_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/operation_value_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/operation_value_py3.py deleted file mode 100644 index 55bceaa7543..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/operation_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/orchestrator_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/orchestrator_profile.py deleted file mode 100644 index d5560a1f879..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/orchestrator_profile.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorProfile(Model): - """Contains information about orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = kwargs.get('orchestrator_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/orchestrator_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/orchestrator_profile_py3.py deleted file mode 100644 index f16e84a1fe3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/orchestrator_profile_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorProfile(Model): - """Contains information about orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - } - - def __init__(self, *, orchestrator_type: str, orchestrator_version: str, **kwargs) -> None: - super(OrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = orchestrator_type - self.orchestrator_version = orchestrator_version diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/resource.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/resource.py deleted file mode 100644 index 5dd7d481c68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/resource_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/resource_py3.py deleted file mode 100644 index 2f3702caf60..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/sub_resource.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/sub_resource.py deleted file mode 100644 index a3f389ba0ba..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/sub_resource.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/sub_resource_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/sub_resource_py3.py deleted file mode 100644 index 9d61511ee2a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/sub_resource_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/tags_object.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/tags_object.py deleted file mode 100644 index 2966ec220f9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/tags_object.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/tags_object_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/tags_object_py3.py deleted file mode 100644 index 8be0bb4a15d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/models/tags_object_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/__init__.py deleted file mode 100644 index b816a99cda0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .operations import Operations -from .managed_clusters_operations import ManagedClustersOperations -from .agent_pools_operations import AgentPoolsOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', - 'AgentPoolsOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/managed_clusters_operations.py deleted file mode 100644 index f9e187d35e9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/managed_clusters_operations.py +++ /dev/null @@ -1,987 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_02_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_02_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_02_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2019_02_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/operations.py deleted file mode 100644 index 595c131971c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/operations.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2019_02_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2019_02_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/__init__.py old mode 100644 new mode 100755 index 9854e4f7645..eb3d7ba7a26 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/__init__.py @@ -1,18 +1,16 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from .container_service_client import ContainerServiceClient -from .version import VERSION - +from ._container_service_client import ContainerServiceClient __all__ = ['ContainerServiceClient'] -__version__ = VERSION - +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/_configuration.py new file mode 100755 index 00000000000..838d4fe4a5c --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/_configuration.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2019-04-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/_container_service_client.py new file mode 100755 index 00000000000..22aedc7879c --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/_container_service_client.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import ContainerServiceClientConfiguration +from .operations import Operations +from .operations import ManagedClustersOperations +from .operations import AgentPoolsOperations +from . import models + + +class ContainerServiceClient(object): + """The Container Service Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerservice.v2019_04_01.operations.Operations + :ivar managed_clusters: ManagedClustersOperations operations + :vartype managed_clusters: azure.mgmt.containerservice.v2019_04_01.operations.ManagedClustersOperations + :ivar agent_pools: AgentPoolsOperations operations + :vartype agent_pools: azure.mgmt.containerservice.v2019_04_01.operations.AgentPoolsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.managed_clusters = ManagedClustersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.agent_pools = AgentPoolsOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> ContainerServiceClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/__init__.py old mode 100644 new mode 100755 similarity index 73% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/version.py rename to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/__init__.py index fe4b0545122..4ad2bb20096 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/version.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/__init__.py @@ -1,13 +1,10 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2019-04-01" - +from ._container_service_client import ContainerServiceClient +__all__ = ['ContainerServiceClient'] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/_configuration.py new file mode 100755 index 00000000000..6e83b5c7716 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/_configuration.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2019-04-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/_container_service_client.py new file mode 100755 index 00000000000..d5378ac4cf3 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/_container_service_client.py @@ -0,0 +1,92 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import ContainerServiceClientConfiguration +from .operations import Operations +from .operations import ManagedClustersOperations +from .operations import AgentPoolsOperations +from .. import models + + +class ContainerServiceClient(object): + """The Container Service Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerservice.v2019_04_01.aio.operations.Operations + :ivar managed_clusters: ManagedClustersOperations operations + :vartype managed_clusters: azure.mgmt.containerservice.v2019_04_01.aio.operations.ManagedClustersOperations + :ivar agent_pools: AgentPoolsOperations operations + :vartype agent_pools: azure.mgmt.containerservice.v2019_04_01.aio.operations.AgentPoolsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.managed_clusters = ManagedClustersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.agent_pools = AgentPoolsOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "ContainerServiceClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/__init__.py old mode 100644 new mode 100755 similarity index 92% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/__init__.py rename to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/__init__.py index d1b67f7888b..5aac40228ee --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/__init__.py @@ -1,12 +1,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from ._operations import Operations diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/_agent_pools_operations.py new file mode 100755 index 00000000000..b6f289badc9 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/_agent_pools_operations.py @@ -0,0 +1,439 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AgentPoolsOperations: + """AgentPoolsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2019_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AgentPoolListResult"]: + """Gets a list of agent pools in the specified managed cluster. + + Gets a list of agent pools in the specified managed cluster. The operation returns properties + of each agent pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPoolListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AgentPoolListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> "_models.AgentPool": + """Gets the agent pool. + + Gets the details of the agent pool by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPool, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.AgentPool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: "_models.AgentPool", + **kwargs: Any + ) -> "_models.AgentPool": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AgentPool') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: "_models.AgentPool", + **kwargs: Any + ) -> AsyncLROPoller["_models.AgentPool"]: + """Creates or updates an agent pool. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :param parameters: Parameters supplied to the Create or Update an agent pool operation. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.AgentPool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AgentPool or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2019_04_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an agent pool. + + Deletes the agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/_managed_clusters_operations.py new file mode 100755 index 00000000000..270cecf7d03 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/_managed_clusters_operations.py @@ -0,0 +1,1101 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ManagedClustersOperations: + """ManagedClustersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2019_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ManagedClusterListResult"]: + """Gets a list of managed clusters in the specified subscription. + + Gets a list of managed clusters in the specified subscription. The operation returns properties + of each managed cluster. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ManagedClusterListResult"]: + """Lists managed clusters in the specified subscription and resource group. + + Lists managed clusters in the specified subscription and resource group. The operation returns + properties of each managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + async def get_upgrade_profile( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.ManagedClusterUpgradeProfile": + """Gets upgrade profile for a managed cluster. + + Gets the details of the upgrade profile for a managed cluster with a specified resource group + and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.get_upgrade_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterUpgradeProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} # type: ignore + + async def get_access_profile( + self, + resource_group_name: str, + resource_name: str, + role_name: str, + **kwargs: Any + ) -> "_models.ManagedClusterAccessProfile": + """Gets an access profile of a managed cluster. + + Gets the accessProfile for the specified role name of the managed cluster with a specified + resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param role_name: The name of the role for managed cluster accessProfile resource. + :type role_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAccessProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterAccessProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.get_access_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterAccessProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} # type: ignore + + async def list_cluster_admin_credentials( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.CredentialResults": + """Gets cluster admin credential of a managed cluster. + + Gets cluster admin credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_admin_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} # type: ignore + + async def list_cluster_user_credentials( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.CredentialResults": + """Gets cluster user credential of a managed cluster. + + Gets cluster user credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.ManagedCluster": + """Gets a managed cluster. + + Gets the details of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedCluster, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedCluster", + **kwargs: Any + ) -> "_models.ManagedCluster": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedCluster') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedCluster", + **kwargs: Any + ) -> AsyncLROPoller["_models.ManagedCluster"]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster with the specified configuration for agents and Kubernetes + version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _update_tags_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ManagedCluster": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_tags_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> AsyncLROPoller["_models.ManagedCluster"]: + """Updates tags on a managed cluster. + + Updates a managed cluster with the specified tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a managed cluster. + + Deletes the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _reset_service_principal_profile_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterServicePrincipalProfile", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_service_principal_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_service_principal_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + async def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterServicePrincipalProfile", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset Service Principal Profile of a managed cluster. + + Update the service principal Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a + Managed Cluster. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterServicePrincipalProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_service_principal_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + async def _reset_aad_profile_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterAADProfile", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_aad_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_aad_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + async def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterAADProfile", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset AAD Profile of a managed cluster. + + Update the AAD Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed + Cluster. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAADProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_aad_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/_operations.py new file mode 100755 index 00000000000..88f0e670aba --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/aio/operations/_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2019_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.OperationListResult"]: + """Gets a list of compute operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2019_04_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/container_service_client.py deleted file mode 100644 index 7f6a9856261..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/container_service_client.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.managed_clusters_operations import ManagedClustersOperations -from .operations.agent_pools_operations import AgentPoolsOperations -from .operations.container_services_operations import ContainerServicesOperations -from . import models - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2019_04_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2019_04_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2019_04_01.operations.AgentPoolsOperations - :ivar container_services: ContainerServices operations - :vartype container_services: azure.mgmt.containerservice.v2019_04_01.operations.ContainerServicesOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-04-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.container_services = ContainerServicesOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/__init__.py old mode 100644 new mode 100755 index 741ab9ea8b7..1a2e8eac670 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/__init__.py @@ -1,127 +1,124 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- try: - from .operation_value_py3 import OperationValue - from .resource_py3 import Resource - from .sub_resource_py3 import SubResource - from .tags_object_py3 import TagsObject - from .managed_cluster_service_principal_profile_py3 import ManagedClusterServicePrincipalProfile - from .container_service_master_profile_py3 import ContainerServiceMasterProfile - from .managed_cluster_agent_pool_profile_properties_py3 import ManagedClusterAgentPoolProfileProperties - from .managed_cluster_agent_pool_profile_py3 import ManagedClusterAgentPoolProfile - from .agent_pool_py3 import AgentPool - from .managed_cluster_windows_profile_py3 import ManagedClusterWindowsProfile - from .container_service_ssh_public_key_py3 import ContainerServiceSshPublicKey - from .container_service_ssh_configuration_py3 import ContainerServiceSshConfiguration - from .container_service_linux_profile_py3 import ContainerServiceLinuxProfile - from .container_service_network_profile_py3 import ContainerServiceNetworkProfile - from .container_service_vm_diagnostics_py3 import ContainerServiceVMDiagnostics - from .container_service_diagnostics_profile_py3 import ContainerServiceDiagnosticsProfile - from .managed_cluster_addon_profile_py3 import ManagedClusterAddonProfile - from .managed_cluster_aad_profile_py3 import ManagedClusterAADProfile - from .managed_cluster_identity_py3 import ManagedClusterIdentity - from .managed_cluster_py3 import ManagedCluster - from .managed_cluster_access_profile_py3 import ManagedClusterAccessProfile - from .managed_cluster_pool_upgrade_profile_upgrades_item_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from .managed_cluster_pool_upgrade_profile_py3 import ManagedClusterPoolUpgradeProfile - from .managed_cluster_upgrade_profile_py3 import ManagedClusterUpgradeProfile - from .credential_result_py3 import CredentialResult - from .credential_results_py3 import CredentialResults - from .orchestrator_profile_py3 import OrchestratorProfile - from .orchestrator_version_profile_py3 import OrchestratorVersionProfile - from .orchestrator_version_profile_list_result_py3 import OrchestratorVersionProfileListResult + from ._models_py3 import AgentPool + from ._models_py3 import AgentPoolListResult + from ._models_py3 import CloudErrorBody + from ._models_py3 import ContainerServiceDiagnosticsProfile + from ._models_py3 import ContainerServiceLinuxProfile + from ._models_py3 import ContainerServiceMasterProfile + from ._models_py3 import ContainerServiceNetworkProfile + from ._models_py3 import ContainerServiceSshConfiguration + from ._models_py3 import ContainerServiceSshPublicKey + from ._models_py3 import ContainerServiceVMDiagnostics + from ._models_py3 import CredentialResult + from ._models_py3 import CredentialResults + from ._models_py3 import ManagedCluster + from ._models_py3 import ManagedClusterAADProfile + from ._models_py3 import ManagedClusterAccessProfile + from ._models_py3 import ManagedClusterAddonProfile + from ._models_py3 import ManagedClusterAgentPoolProfile + from ._models_py3 import ManagedClusterAgentPoolProfileProperties + from ._models_py3 import ManagedClusterIdentity + from ._models_py3 import ManagedClusterListResult + from ._models_py3 import ManagedClusterPoolUpgradeProfile + from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem + from ._models_py3 import ManagedClusterServicePrincipalProfile + from ._models_py3 import ManagedClusterUpgradeProfile + from ._models_py3 import ManagedClusterWindowsProfile + from ._models_py3 import OperationListResult + from ._models_py3 import OperationValue + from ._models_py3 import Resource + from ._models_py3 import SubResource + from ._models_py3 import TagsObject except (SyntaxError, ImportError): - from .operation_value import OperationValue - from .resource import Resource - from .sub_resource import SubResource - from .tags_object import TagsObject - from .managed_cluster_service_principal_profile import ManagedClusterServicePrincipalProfile - from .container_service_master_profile import ContainerServiceMasterProfile - from .managed_cluster_agent_pool_profile_properties import ManagedClusterAgentPoolProfileProperties - from .managed_cluster_agent_pool_profile import ManagedClusterAgentPoolProfile - from .agent_pool import AgentPool - from .managed_cluster_windows_profile import ManagedClusterWindowsProfile - from .container_service_ssh_public_key import ContainerServiceSshPublicKey - from .container_service_ssh_configuration import ContainerServiceSshConfiguration - from .container_service_linux_profile import ContainerServiceLinuxProfile - from .container_service_network_profile import ContainerServiceNetworkProfile - from .container_service_vm_diagnostics import ContainerServiceVMDiagnostics - from .container_service_diagnostics_profile import ContainerServiceDiagnosticsProfile - from .managed_cluster_addon_profile import ManagedClusterAddonProfile - from .managed_cluster_aad_profile import ManagedClusterAADProfile - from .managed_cluster_identity import ManagedClusterIdentity - from .managed_cluster import ManagedCluster - from .managed_cluster_access_profile import ManagedClusterAccessProfile - from .managed_cluster_pool_upgrade_profile_upgrades_item import ManagedClusterPoolUpgradeProfileUpgradesItem - from .managed_cluster_pool_upgrade_profile import ManagedClusterPoolUpgradeProfile - from .managed_cluster_upgrade_profile import ManagedClusterUpgradeProfile - from .credential_result import CredentialResult - from .credential_results import CredentialResults - from .orchestrator_profile import OrchestratorProfile - from .orchestrator_version_profile import OrchestratorVersionProfile - from .orchestrator_version_profile_list_result import OrchestratorVersionProfileListResult -from .operation_value_paged import OperationValuePaged -from .managed_cluster_paged import ManagedClusterPaged -from .agent_pool_paged import AgentPoolPaged -from .container_service_client_enums import ( + from ._models import AgentPool # type: ignore + from ._models import AgentPoolListResult # type: ignore + from ._models import CloudErrorBody # type: ignore + from ._models import ContainerServiceDiagnosticsProfile # type: ignore + from ._models import ContainerServiceLinuxProfile # type: ignore + from ._models import ContainerServiceMasterProfile # type: ignore + from ._models import ContainerServiceNetworkProfile # type: ignore + from ._models import ContainerServiceSshConfiguration # type: ignore + from ._models import ContainerServiceSshPublicKey # type: ignore + from ._models import ContainerServiceVMDiagnostics # type: ignore + from ._models import CredentialResult # type: ignore + from ._models import CredentialResults # type: ignore + from ._models import ManagedCluster # type: ignore + from ._models import ManagedClusterAADProfile # type: ignore + from ._models import ManagedClusterAccessProfile # type: ignore + from ._models import ManagedClusterAddonProfile # type: ignore + from ._models import ManagedClusterAgentPoolProfile # type: ignore + from ._models import ManagedClusterAgentPoolProfileProperties # type: ignore + from ._models import ManagedClusterIdentity # type: ignore + from ._models import ManagedClusterListResult # type: ignore + from ._models import ManagedClusterPoolUpgradeProfile # type: ignore + from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem # type: ignore + from ._models import ManagedClusterServicePrincipalProfile # type: ignore + from ._models import ManagedClusterUpgradeProfile # type: ignore + from ._models import ManagedClusterWindowsProfile # type: ignore + from ._models import OperationListResult # type: ignore + from ._models import OperationValue # type: ignore + from ._models import Resource # type: ignore + from ._models import SubResource # type: ignore + from ._models import TagsObject # type: ignore + +from ._container_service_client_enums import ( + AgentPoolType, ContainerServiceStorageProfileTypes, ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, + Count, + LoadBalancerSku, NetworkPlugin, NetworkPolicy, - LoadBalancerSku, + OSType, ResourceIdentityType, ) __all__ = [ - 'OperationValue', - 'Resource', - 'SubResource', - 'TagsObject', - 'ManagedClusterServicePrincipalProfile', - 'ContainerServiceMasterProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAgentPoolProfile', 'AgentPool', - 'ManagedClusterWindowsProfile', - 'ContainerServiceSshPublicKey', - 'ContainerServiceSshConfiguration', + 'AgentPoolListResult', + 'CloudErrorBody', + 'ContainerServiceDiagnosticsProfile', 'ContainerServiceLinuxProfile', + 'ContainerServiceMasterProfile', 'ContainerServiceNetworkProfile', + 'ContainerServiceSshConfiguration', + 'ContainerServiceSshPublicKey', 'ContainerServiceVMDiagnostics', - 'ContainerServiceDiagnosticsProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAADProfile', - 'ManagedClusterIdentity', + 'CredentialResult', + 'CredentialResults', 'ManagedCluster', + 'ManagedClusterAADProfile', 'ManagedClusterAccessProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', + 'ManagedClusterAddonProfile', + 'ManagedClusterAgentPoolProfile', + 'ManagedClusterAgentPoolProfileProperties', + 'ManagedClusterIdentity', + 'ManagedClusterListResult', 'ManagedClusterPoolUpgradeProfile', + 'ManagedClusterPoolUpgradeProfileUpgradesItem', + 'ManagedClusterServicePrincipalProfile', 'ManagedClusterUpgradeProfile', - 'CredentialResult', - 'CredentialResults', - 'OrchestratorProfile', - 'OrchestratorVersionProfile', - 'OrchestratorVersionProfileListResult', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', + 'ManagedClusterWindowsProfile', + 'OperationListResult', + 'OperationValue', + 'Resource', + 'SubResource', + 'TagsObject', + 'AgentPoolType', 'ContainerServiceStorageProfileTypes', 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', + 'Count', + 'LoadBalancerSku', 'NetworkPlugin', 'NetworkPolicy', - 'LoadBalancerSku', + 'OSType', 'ResourceIdentityType', ] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/_container_service_client_enums.py new file mode 100755 index 00000000000..02e7ae312cd --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/_container_service_client_enums.py @@ -0,0 +1,269 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AgentPoolType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """AgentPoolType represents types of an agent pool. VirtualMachineScaleSets type is still in + PREVIEW. + """ + + VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" + AVAILABILITY_SET = "AvailabilitySet" + +class ContainerServiceStorageProfileTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Storage profile specifies what kind of storage used. Choose from StorageAccount and + ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. + """ + + STORAGE_ACCOUNT = "StorageAccount" + MANAGED_DISKS = "ManagedDisks" + +class ContainerServiceVMSizeTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Size of agent VMs. + """ + + STANDARD_A1 = "Standard_A1" + STANDARD_A10 = "Standard_A10" + STANDARD_A11 = "Standard_A11" + STANDARD_A1_V2 = "Standard_A1_v2" + STANDARD_A2 = "Standard_A2" + STANDARD_A2_V2 = "Standard_A2_v2" + STANDARD_A2_M_V2 = "Standard_A2m_v2" + STANDARD_A3 = "Standard_A3" + STANDARD_A4 = "Standard_A4" + STANDARD_A4_V2 = "Standard_A4_v2" + STANDARD_A4_M_V2 = "Standard_A4m_v2" + STANDARD_A5 = "Standard_A5" + STANDARD_A6 = "Standard_A6" + STANDARD_A7 = "Standard_A7" + STANDARD_A8 = "Standard_A8" + STANDARD_A8_V2 = "Standard_A8_v2" + STANDARD_A8_M_V2 = "Standard_A8m_v2" + STANDARD_A9 = "Standard_A9" + STANDARD_B2_MS = "Standard_B2ms" + STANDARD_B2_S = "Standard_B2s" + STANDARD_B4_MS = "Standard_B4ms" + STANDARD_B8_MS = "Standard_B8ms" + STANDARD_D1 = "Standard_D1" + STANDARD_D11 = "Standard_D11" + STANDARD_D11_V2 = "Standard_D11_v2" + STANDARD_D11_V2_PROMO = "Standard_D11_v2_Promo" + STANDARD_D12 = "Standard_D12" + STANDARD_D12_V2 = "Standard_D12_v2" + STANDARD_D12_V2_PROMO = "Standard_D12_v2_Promo" + STANDARD_D13 = "Standard_D13" + STANDARD_D13_V2 = "Standard_D13_v2" + STANDARD_D13_V2_PROMO = "Standard_D13_v2_Promo" + STANDARD_D14 = "Standard_D14" + STANDARD_D14_V2 = "Standard_D14_v2" + STANDARD_D14_V2_PROMO = "Standard_D14_v2_Promo" + STANDARD_D15_V2 = "Standard_D15_v2" + STANDARD_D16_V3 = "Standard_D16_v3" + STANDARD_D16_S_V3 = "Standard_D16s_v3" + STANDARD_D1_V2 = "Standard_D1_v2" + STANDARD_D2 = "Standard_D2" + STANDARD_D2_V2 = "Standard_D2_v2" + STANDARD_D2_V2_PROMO = "Standard_D2_v2_Promo" + STANDARD_D2_V3 = "Standard_D2_v3" + STANDARD_D2_S_V3 = "Standard_D2s_v3" + STANDARD_D3 = "Standard_D3" + STANDARD_D32_V3 = "Standard_D32_v3" + STANDARD_D32_S_V3 = "Standard_D32s_v3" + STANDARD_D3_V2 = "Standard_D3_v2" + STANDARD_D3_V2_PROMO = "Standard_D3_v2_Promo" + STANDARD_D4 = "Standard_D4" + STANDARD_D4_V2 = "Standard_D4_v2" + STANDARD_D4_V2_PROMO = "Standard_D4_v2_Promo" + STANDARD_D4_V3 = "Standard_D4_v3" + STANDARD_D4_S_V3 = "Standard_D4s_v3" + STANDARD_D5_V2 = "Standard_D5_v2" + STANDARD_D5_V2_PROMO = "Standard_D5_v2_Promo" + STANDARD_D64_V3 = "Standard_D64_v3" + STANDARD_D64_S_V3 = "Standard_D64s_v3" + STANDARD_D8_V3 = "Standard_D8_v3" + STANDARD_D8_S_V3 = "Standard_D8s_v3" + STANDARD_DS1 = "Standard_DS1" + STANDARD_DS11 = "Standard_DS11" + STANDARD_DS11_V2 = "Standard_DS11_v2" + STANDARD_DS11_V2_PROMO = "Standard_DS11_v2_Promo" + STANDARD_DS12 = "Standard_DS12" + STANDARD_DS12_V2 = "Standard_DS12_v2" + STANDARD_DS12_V2_PROMO = "Standard_DS12_v2_Promo" + STANDARD_DS13 = "Standard_DS13" + STANDARD_DS13_2_V2 = "Standard_DS13-2_v2" + STANDARD_DS13_4_V2 = "Standard_DS13-4_v2" + STANDARD_DS13_V2 = "Standard_DS13_v2" + STANDARD_DS13_V2_PROMO = "Standard_DS13_v2_Promo" + STANDARD_DS14 = "Standard_DS14" + STANDARD_DS14_4_V2 = "Standard_DS14-4_v2" + STANDARD_DS14_8_V2 = "Standard_DS14-8_v2" + STANDARD_DS14_V2 = "Standard_DS14_v2" + STANDARD_DS14_V2_PROMO = "Standard_DS14_v2_Promo" + STANDARD_DS15_V2 = "Standard_DS15_v2" + STANDARD_DS1_V2 = "Standard_DS1_v2" + STANDARD_DS2 = "Standard_DS2" + STANDARD_DS2_V2 = "Standard_DS2_v2" + STANDARD_DS2_V2_PROMO = "Standard_DS2_v2_Promo" + STANDARD_DS3 = "Standard_DS3" + STANDARD_DS3_V2 = "Standard_DS3_v2" + STANDARD_DS3_V2_PROMO = "Standard_DS3_v2_Promo" + STANDARD_DS4 = "Standard_DS4" + STANDARD_DS4_V2 = "Standard_DS4_v2" + STANDARD_DS4_V2_PROMO = "Standard_DS4_v2_Promo" + STANDARD_DS5_V2 = "Standard_DS5_v2" + STANDARD_DS5_V2_PROMO = "Standard_DS5_v2_Promo" + STANDARD_E16_V3 = "Standard_E16_v3" + STANDARD_E16_S_V3 = "Standard_E16s_v3" + STANDARD_E2_V3 = "Standard_E2_v3" + STANDARD_E2_S_V3 = "Standard_E2s_v3" + STANDARD_E32_16_S_V3 = "Standard_E32-16s_v3" + STANDARD_E32_8_S_V3 = "Standard_E32-8s_v3" + STANDARD_E32_V3 = "Standard_E32_v3" + STANDARD_E32_S_V3 = "Standard_E32s_v3" + STANDARD_E4_V3 = "Standard_E4_v3" + STANDARD_E4_S_V3 = "Standard_E4s_v3" + STANDARD_E64_16_S_V3 = "Standard_E64-16s_v3" + STANDARD_E64_32_S_V3 = "Standard_E64-32s_v3" + STANDARD_E64_V3 = "Standard_E64_v3" + STANDARD_E64_S_V3 = "Standard_E64s_v3" + STANDARD_E8_V3 = "Standard_E8_v3" + STANDARD_E8_S_V3 = "Standard_E8s_v3" + STANDARD_F1 = "Standard_F1" + STANDARD_F16 = "Standard_F16" + STANDARD_F16_S = "Standard_F16s" + STANDARD_F16_S_V2 = "Standard_F16s_v2" + STANDARD_F1_S = "Standard_F1s" + STANDARD_F2 = "Standard_F2" + STANDARD_F2_S = "Standard_F2s" + STANDARD_F2_S_V2 = "Standard_F2s_v2" + STANDARD_F32_S_V2 = "Standard_F32s_v2" + STANDARD_F4 = "Standard_F4" + STANDARD_F4_S = "Standard_F4s" + STANDARD_F4_S_V2 = "Standard_F4s_v2" + STANDARD_F64_S_V2 = "Standard_F64s_v2" + STANDARD_F72_S_V2 = "Standard_F72s_v2" + STANDARD_F8 = "Standard_F8" + STANDARD_F8_S = "Standard_F8s" + STANDARD_F8_S_V2 = "Standard_F8s_v2" + STANDARD_G1 = "Standard_G1" + STANDARD_G2 = "Standard_G2" + STANDARD_G3 = "Standard_G3" + STANDARD_G4 = "Standard_G4" + STANDARD_G5 = "Standard_G5" + STANDARD_GS1 = "Standard_GS1" + STANDARD_GS2 = "Standard_GS2" + STANDARD_GS3 = "Standard_GS3" + STANDARD_GS4 = "Standard_GS4" + STANDARD_GS4_4 = "Standard_GS4-4" + STANDARD_GS4_8 = "Standard_GS4-8" + STANDARD_GS5 = "Standard_GS5" + STANDARD_GS5_16 = "Standard_GS5-16" + STANDARD_GS5_8 = "Standard_GS5-8" + STANDARD_H16 = "Standard_H16" + STANDARD_H16_M = "Standard_H16m" + STANDARD_H16_MR = "Standard_H16mr" + STANDARD_H16_R = "Standard_H16r" + STANDARD_H8 = "Standard_H8" + STANDARD_H8_M = "Standard_H8m" + STANDARD_L16_S = "Standard_L16s" + STANDARD_L32_S = "Standard_L32s" + STANDARD_L4_S = "Standard_L4s" + STANDARD_L8_S = "Standard_L8s" + STANDARD_M128_32_MS = "Standard_M128-32ms" + STANDARD_M128_64_MS = "Standard_M128-64ms" + STANDARD_M128_MS = "Standard_M128ms" + STANDARD_M128_S = "Standard_M128s" + STANDARD_M64_16_MS = "Standard_M64-16ms" + STANDARD_M64_32_MS = "Standard_M64-32ms" + STANDARD_M64_MS = "Standard_M64ms" + STANDARD_M64_S = "Standard_M64s" + STANDARD_NC12 = "Standard_NC12" + STANDARD_NC12_S_V2 = "Standard_NC12s_v2" + STANDARD_NC12_S_V3 = "Standard_NC12s_v3" + STANDARD_NC24 = "Standard_NC24" + STANDARD_NC24_R = "Standard_NC24r" + STANDARD_NC24_RS_V2 = "Standard_NC24rs_v2" + STANDARD_NC24_RS_V3 = "Standard_NC24rs_v3" + STANDARD_NC24_S_V2 = "Standard_NC24s_v2" + STANDARD_NC24_S_V3 = "Standard_NC24s_v3" + STANDARD_NC6 = "Standard_NC6" + STANDARD_NC6_S_V2 = "Standard_NC6s_v2" + STANDARD_NC6_S_V3 = "Standard_NC6s_v3" + STANDARD_ND12_S = "Standard_ND12s" + STANDARD_ND24_RS = "Standard_ND24rs" + STANDARD_ND24_S = "Standard_ND24s" + STANDARD_ND6_S = "Standard_ND6s" + STANDARD_NV12 = "Standard_NV12" + STANDARD_NV24 = "Standard_NV24" + STANDARD_NV6 = "Standard_NV6" + +class Count(with_metaclass(_CaseInsensitiveEnumMeta, int, Enum)): + """Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The + default value is 1. + """ + + ONE = 1 + THREE = 3 + FIVE = 5 + +class LoadBalancerSku(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The load balancer sku for the managed cluster. + """ + + STANDARD = "standard" + BASIC = "basic" + +class NetworkPlugin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network plugin used for building Kubernetes network. + """ + + AZURE = "azure" + KUBENET = "kubenet" + +class NetworkPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network policy used for building Kubernetes network. + """ + + CALICO = "calico" + AZURE = "azure" + +class OSType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + """ + + LINUX = "Linux" + WINDOWS = "Windows" + +class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly + created identity in master components and an auto-created user assigned identity in MC_ + resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, service + principal will be used instead. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + NONE = "None" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/_models.py new file mode 100755 index 00000000000..df83703d36e --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/_models.py @@ -0,0 +1,1466 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import msrest.serialization + + +class SubResource(msrest.serialization.Model): + """Reference to another subresource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AgentPool(SubResource): + """Agent Pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 1 to 100 (inclusive). The default value is 1. + :type count: int + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2019_04_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: Minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param type_properties_type: AgentPoolType represents types of an agent pool. Possible values + include: "VirtualMachineScaleSets", "AvailabilitySet". + :type type_properties_type: str or + ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. + :type orchestrator_version: str + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param availability_zones: (PREVIEW) Availability zones for nodes. Must use + VirtualMachineScaleSets AgentPoolType. + :type availability_zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'count': {'maximum': 100, 'minimum': 1}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, + 'min_count': {'key': 'properties.minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPool, self).__init__(**kwargs) + self.count = kwargs.get('count', 1) + self.vm_size = kwargs.get('vm_size', None) + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.max_pods = kwargs.get('max_pods', None) + self.os_type = kwargs.get('os_type', "Linux") + self.max_count = kwargs.get('max_count', None) + self.min_count = kwargs.get('min_count', None) + self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) + self.type_properties_type = kwargs.get('type_properties_type', None) + self.orchestrator_version = kwargs.get('orchestrator_version', None) + self.provisioning_state = None + self.availability_zones = kwargs.get('availability_zones', None) + + +class AgentPoolListResult(msrest.serialization.Model): + """The response from the List Agent Pools operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of agent pools. + :type value: list[~azure.mgmt.containerservice.v2019_04_01.models.AgentPool] + :ivar next_link: The URL to get the next set of agent pool results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AgentPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPoolListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the Container service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.containerservice.v2019_04_01.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): + """Profile for diagnostics on the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. + :type vm_diagnostics: + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMDiagnostics + """ + + _validation = { + 'vm_diagnostics': {'required': True}, + } + + _attribute_map = { + 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) + self.vm_diagnostics = kwargs['vm_diagnostics'] + + +class ContainerServiceLinuxProfile(msrest.serialization.Model): + """Profile for Linux VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for Linux VMs. + :type admin_username: str + :param ssh: Required. SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceSshConfiguration + """ + + _validation = { + 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, + 'ssh': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceLinuxProfile, self).__init__(**kwargs) + self.admin_username = kwargs['admin_username'] + self.ssh = kwargs['ssh'] + + +class ContainerServiceMasterProfile(msrest.serialization.Model): + """Profile for the container service master. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2019_04_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. + :type dns_prefix: str + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. + :type first_consecutive_static_ip: str + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". + :type storage_profile: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceStorageProfileTypes + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + """ + + _validation = { + 'dns_prefix': {'required': True}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceMasterProfile, self).__init__(**kwargs) + self.count = kwargs.get('count', "1") + self.dns_prefix = kwargs['dns_prefix'] + self.vm_size = kwargs['vm_size'] + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") + self.storage_profile = kwargs.get('storage_profile', None) + self.fqdn = None + + +class ContainerServiceNetworkProfile(msrest.serialization.Model): + """Profile of network configuration. + + :param network_plugin: Network plugin used for building Kubernetes network. Possible values + include: "azure", "kubenet". Default value: "kubenet". + :type network_plugin: str or ~azure.mgmt.containerservice.v2019_04_01.models.NetworkPlugin + :param network_policy: Network policy used for building Kubernetes network. Possible values + include: "calico", "azure". + :type network_policy: str or ~azure.mgmt.containerservice.v2019_04_01.models.NetworkPolicy + :param pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. + :type pod_cidr: str + :param service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. + :type service_cidr: str + :param dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. + :type dns_service_ip: str + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. + :type docker_bridge_cidr: str + :param load_balancer_sku: The load balancer sku for the managed cluster. Possible values + include: "standard", "basic". + :type load_balancer_sku: str or ~azure.mgmt.containerservice.v2019_04_01.models.LoadBalancerSku + """ + + _validation = { + 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, + 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + } + + _attribute_map = { + 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, + 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, + 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, + 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, + 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceNetworkProfile, self).__init__(**kwargs) + self.network_plugin = kwargs.get('network_plugin', "kubenet") + self.network_policy = kwargs.get('network_policy', None) + self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") + self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") + self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") + self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") + self.load_balancer_sku = kwargs.get('load_balancer_sku', None) + + +class ContainerServiceSshConfiguration(msrest.serialization.Model): + """SSH configuration for Linux-based VMs running on Azure. + + All required parameters must be populated in order to send to Azure. + + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. Only expect one key specified. + :type public_keys: + list[~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceSshPublicKey] + """ + + _validation = { + 'public_keys': {'required': True}, + } + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceSshConfiguration, self).__init__(**kwargs) + self.public_keys = kwargs['public_keys'] + + +class ContainerServiceSshPublicKey(msrest.serialization.Model): + """Contains information about SSH certificate public key data. + + All required parameters must be populated in order to send to Azure. + + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. + :type key_data: str + """ + + _validation = { + 'key_data': {'required': True}, + } + + _attribute_map = { + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceSshPublicKey, self).__init__(**kwargs) + self.key_data = kwargs['key_data'] + + +class ContainerServiceVMDiagnostics(msrest.serialization.Model): + """Profile for diagnostics on the container service VMs. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. + :type enabled: bool + :ivar storage_uri: The URI of the storage account where diagnostics are stored. + :vartype storage_uri: str + """ + + _validation = { + 'enabled': {'required': True}, + 'storage_uri': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) + self.enabled = kwargs['enabled'] + self.storage_uri = None + + +class CredentialResult(msrest.serialization.Model): + """The credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the credential. + :vartype name: str + :ivar value: Base64-encoded Kubernetes configuration file. + :vartype value: bytearray + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResult, self).__init__(**kwargs) + self.name = None + self.value = None + + +class CredentialResults(msrest.serialization.Model): + """The list of credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: list[~azure.mgmt.containerservice.v2019_04_01.models.CredentialResult] + """ + + _validation = { + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResults, self).__init__(**kwargs) + self.kubeconfigs = None + + +class Resource(msrest.serialization.Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + + +class ManagedCluster(Resource): + """Managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. + :type kubernetes_version: str + :param dns_prefix: DNS prefix specified when creating the managed cluster. + :type dns_prefix: str + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAgentPoolProfile] + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceLinuxProfile + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterWindowsProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterServicePrincipalProfile + :param addon_profiles: Profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAddonProfile] + :param node_resource_group: Name of the resource group containing agent pool nodes. + :type node_resource_group: str + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :type enable_rbac: bool + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. + :type enable_pod_security_policy: bool + :param network_profile: Profile of network configuration. + :type network_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceNetworkProfile + :param aad_profile: Profile of Azure Active Directory configuration. + :type aad_profile: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAADProfile + :param api_server_authorized_ip_ranges: (PREVIEW) Authorized IP Ranges to kubernetes API + server. + :type api_server_authorized_ip_ranges: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'max_agent_pools': {'readonly': True}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + 'api_server_authorized_ip_ranges': {'key': 'properties.apiServerAuthorizedIPRanges', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedCluster, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.provisioning_state = None + self.max_agent_pools = None + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.dns_prefix = kwargs.get('dns_prefix', None) + self.fqdn = None + self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) + self.linux_profile = kwargs.get('linux_profile', None) + self.windows_profile = kwargs.get('windows_profile', None) + self.service_principal_profile = kwargs.get('service_principal_profile', None) + self.addon_profiles = kwargs.get('addon_profiles', None) + self.node_resource_group = kwargs.get('node_resource_group', None) + self.enable_rbac = kwargs.get('enable_rbac', None) + self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) + self.network_profile = kwargs.get('network_profile', None) + self.aad_profile = kwargs.get('aad_profile', None) + self.api_server_authorized_ip_ranges = kwargs.get('api_server_authorized_ip_ranges', None) + + +class ManagedClusterAADProfile(msrest.serialization.Model): + """AADProfile specifies attributes for Azure Active Directory integration. + + All required parameters must be populated in order to send to Azure. + + :param client_app_id: Required. The client AAD application ID. + :type client_app_id: str + :param server_app_id: Required. The server AAD application ID. + :type server_app_id: str + :param server_app_secret: The server AAD application secret. + :type server_app_secret: str + :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. + :type tenant_id: str + """ + + _validation = { + 'client_app_id': {'required': True}, + 'server_app_id': {'required': True}, + } + + _attribute_map = { + 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, + 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, + 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, + 'tenant_id': {'key': 'tenantID', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAADProfile, self).__init__(**kwargs) + self.client_app_id = kwargs['client_app_id'] + self.server_app_id = kwargs['server_app_id'] + self.server_app_secret = kwargs.get('server_app_secret', None) + self.tenant_id = kwargs.get('tenant_id', None) + + +class ManagedClusterAccessProfile(Resource): + """Managed cluster Access Profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param kube_config: Base64-encoded Kubernetes configuration file. + :type kube_config: bytearray + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAccessProfile, self).__init__(**kwargs) + self.kube_config = kwargs.get('kube_config', None) + + +class ManagedClusterAddonProfile(msrest.serialization.Model): + """A Kubernetes add-on profile for a managed cluster. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the add-on is enabled or not. + :type enabled: bool + :param config: Key-value pairs for configuring an add-on. + :type config: dict[str, str] + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'config': {'key': 'config', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAddonProfile, self).__init__(**kwargs) + self.enabled = kwargs['enabled'] + self.config = kwargs.get('config', None) + + +class ManagedClusterAgentPoolProfileProperties(msrest.serialization.Model): + """Properties for the container service agent pool profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Required. Number of agents (VMs) to host docker containers. Allowed values must + be in the range of 1 to 100 (inclusive). The default value is 1. + :type count: int + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2019_04_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: Minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. + :type orchestrator_version: str + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param availability_zones: (PREVIEW) Availability zones for nodes. Must use + VirtualMachineScaleSets AgentPoolType. + :type availability_zones: list[str] + """ + + _validation = { + 'count': {'required': True, 'maximum': 100, 'minimum': 1}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'maxPods', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) + self.count = kwargs.get('count', 1) + self.vm_size = kwargs['vm_size'] + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.max_pods = kwargs.get('max_pods', None) + self.os_type = kwargs.get('os_type', "Linux") + self.max_count = kwargs.get('max_count', None) + self.min_count = kwargs.get('min_count', None) + self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) + self.type = kwargs.get('type', None) + self.orchestrator_version = kwargs.get('orchestrator_version', None) + self.provisioning_state = None + self.availability_zones = kwargs.get('availability_zones', None) + + +class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): + """Profile for the container service agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Required. Number of agents (VMs) to host docker containers. Allowed values must + be in the range of 1 to 100 (inclusive). The default value is 1. + :type count: int + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2019_04_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: Minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. + :type orchestrator_version: str + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param availability_zones: (PREVIEW) Availability zones for nodes. Must use + VirtualMachineScaleSets AgentPoolType. + :type availability_zones: list[str] + :param name: Required. Unique name of the agent pool profile in the context of the subscription + and resource group. + :type name: str + """ + + _validation = { + 'count': {'required': True, 'maximum': 100, 'minimum': 1}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'maxPods', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) + self.name = kwargs['name'] + + +class ManagedClusterIdentity(msrest.serialization.Model): + """Identity for the managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of the system assigned identity which is used by master + components. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the system assigned identity which is used by master + components. + :vartype tenant_id: str + :param type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use + an implicitly created identity in master components and an auto-created user assigned identity + in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, + service principal will be used instead. Possible values include: "SystemAssigned", "None". + :type type: str or ~azure.mgmt.containerservice.v2019_04_01.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class ManagedClusterListResult(msrest.serialization.Model): + """The response from the List Managed Clusters operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of managed clusters. + :type value: list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] + :ivar next_link: The URL to get the next set of managed cluster results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ManagedCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class ManagedClusterPoolUpgradeProfile(msrest.serialization.Model): + """The list of available upgrade versions. + + All required parameters must be populated in order to send to Azure. + + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). + :type kubernetes_version: str + :param name: Pool name. + :type name: str + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2019_04_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. + :type upgrades: + list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] + """ + + _validation = { + 'kubernetes_version': {'required': True}, + 'os_type': {'required': True}, + } + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) + self.kubernetes_version = kwargs['kubernetes_version'] + self.name = kwargs.get('name', None) + self.os_type = kwargs.get('os_type', "Linux") + self.upgrades = kwargs.get('upgrades', None) + + +class ManagedClusterPoolUpgradeProfileUpgradesItem(msrest.serialization.Model): + """ManagedClusterPoolUpgradeProfileUpgradesItem. + + :param kubernetes_version: Kubernetes version (major, minor, patch). + :type kubernetes_version: str + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.is_preview = kwargs.get('is_preview', None) + + +class ManagedClusterServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The ID for the service principal. + :type client_id: str + :param secret: The secret password associated with the service principal in plain text. + :type secret: str + """ + + _validation = { + 'client_id': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) + self.client_id = kwargs['client_id'] + self.secret = kwargs.get('secret', None) + + +class ManagedClusterUpgradeProfile(msrest.serialization.Model): + """The list of available upgrades for compute pools. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Id of upgrade profile. + :vartype id: str + :ivar name: Name of upgrade profile. + :vartype name: str + :ivar type: Type of upgrade profile. + :vartype type: str + :param control_plane_profile: Required. The list of available upgrade versions for the control + plane. + :type control_plane_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfile + :param agent_pool_profiles: Required. The list of available upgrade versions for agent pools. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfile] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'control_plane_profile': {'required': True}, + 'agent_pool_profiles': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.control_plane_profile = kwargs['control_plane_profile'] + self.agent_pool_profiles = kwargs['agent_pool_profiles'] + + +class ManagedClusterWindowsProfile(msrest.serialization.Model): + """Profile for Windows VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. Specifies the name of the administrator account. + :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", + "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", + "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + "sys", "test2", "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 + character :code:`
`:code:`
` **Max-length:** 20 characters. + :type admin_username: str + :param admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` + **Max-length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". + :type admin_password: str + """ + + _validation = { + 'admin_username': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterWindowsProfile, self).__init__(**kwargs) + self.admin_username = kwargs['admin_username'] + self.admin_password = kwargs.get('admin_password', None) + + +class OperationListResult(msrest.serialization.Model): + """The List Compute Operation operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of compute operations. + :vartype value: list[~azure.mgmt.containerservice.v2019_04_01.models.OperationValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationValue]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + + +class OperationValue(msrest.serialization.Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class TagsObject(msrest.serialization.Model): + """Tags object for patch operations. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(TagsObject, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/_models_py3.py new file mode 100755 index 00000000000..169658545b0 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/_models_py3.py @@ -0,0 +1,1599 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Dict, List, Optional, Union + +import msrest.serialization + +from ._container_service_client_enums import * + + +class SubResource(msrest.serialization.Model): + """Reference to another subresource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AgentPool(SubResource): + """Agent Pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 1 to 100 (inclusive). The default value is 1. + :type count: int + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2019_04_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: Minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param type_properties_type: AgentPoolType represents types of an agent pool. Possible values + include: "VirtualMachineScaleSets", "AvailabilitySet". + :type type_properties_type: str or + ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. + :type orchestrator_version: str + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param availability_zones: (PREVIEW) Availability zones for nodes. Must use + VirtualMachineScaleSets AgentPoolType. + :type availability_zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'count': {'maximum': 100, 'minimum': 1}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, + 'min_count': {'key': 'properties.minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, + } + + def __init__( + self, + *, + count: Optional[int] = 1, + vm_size: Optional[Union[str, "ContainerServiceVMSizeTypes"]] = None, + os_disk_size_gb: Optional[int] = None, + vnet_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type_properties_type: Optional[Union[str, "AgentPoolType"]] = None, + orchestrator_version: Optional[str] = None, + availability_zones: Optional[List[str]] = None, + **kwargs + ): + super(AgentPool, self).__init__(**kwargs) + self.count = count + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.vnet_subnet_id = vnet_subnet_id + self.max_pods = max_pods + self.os_type = os_type + self.max_count = max_count + self.min_count = min_count + self.enable_auto_scaling = enable_auto_scaling + self.type_properties_type = type_properties_type + self.orchestrator_version = orchestrator_version + self.provisioning_state = None + self.availability_zones = availability_zones + + +class AgentPoolListResult(msrest.serialization.Model): + """The response from the List Agent Pools operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of agent pools. + :type value: list[~azure.mgmt.containerservice.v2019_04_01.models.AgentPool] + :ivar next_link: The URL to get the next set of agent pool results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AgentPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AgentPool"]] = None, + **kwargs + ): + super(AgentPoolListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the Container service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.containerservice.v2019_04_01.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["CloudErrorBody"]] = None, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): + """Profile for diagnostics on the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. + :type vm_diagnostics: + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMDiagnostics + """ + + _validation = { + 'vm_diagnostics': {'required': True}, + } + + _attribute_map = { + 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, + } + + def __init__( + self, + *, + vm_diagnostics: "ContainerServiceVMDiagnostics", + **kwargs + ): + super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) + self.vm_diagnostics = vm_diagnostics + + +class ContainerServiceLinuxProfile(msrest.serialization.Model): + """Profile for Linux VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for Linux VMs. + :type admin_username: str + :param ssh: Required. SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceSshConfiguration + """ + + _validation = { + 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, + 'ssh': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, + } + + def __init__( + self, + *, + admin_username: str, + ssh: "ContainerServiceSshConfiguration", + **kwargs + ): + super(ContainerServiceLinuxProfile, self).__init__(**kwargs) + self.admin_username = admin_username + self.ssh = ssh + + +class ContainerServiceMasterProfile(msrest.serialization.Model): + """Profile for the container service master. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2019_04_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. + :type dns_prefix: str + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. + :type first_consecutive_static_ip: str + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". + :type storage_profile: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceStorageProfileTypes + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + """ + + _validation = { + 'dns_prefix': {'required': True}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + } + + def __init__( + self, + *, + dns_prefix: str, + vm_size: Union[str, "ContainerServiceVMSizeTypes"], + count: Optional[Union[int, "Count"]] = "1", + os_disk_size_gb: Optional[int] = None, + vnet_subnet_id: Optional[str] = None, + first_consecutive_static_ip: Optional[str] = "10.240.255.5", + storage_profile: Optional[Union[str, "ContainerServiceStorageProfileTypes"]] = None, + **kwargs + ): + super(ContainerServiceMasterProfile, self).__init__(**kwargs) + self.count = count + self.dns_prefix = dns_prefix + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.vnet_subnet_id = vnet_subnet_id + self.first_consecutive_static_ip = first_consecutive_static_ip + self.storage_profile = storage_profile + self.fqdn = None + + +class ContainerServiceNetworkProfile(msrest.serialization.Model): + """Profile of network configuration. + + :param network_plugin: Network plugin used for building Kubernetes network. Possible values + include: "azure", "kubenet". Default value: "kubenet". + :type network_plugin: str or ~azure.mgmt.containerservice.v2019_04_01.models.NetworkPlugin + :param network_policy: Network policy used for building Kubernetes network. Possible values + include: "calico", "azure". + :type network_policy: str or ~azure.mgmt.containerservice.v2019_04_01.models.NetworkPolicy + :param pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. + :type pod_cidr: str + :param service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. + :type service_cidr: str + :param dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. + :type dns_service_ip: str + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. + :type docker_bridge_cidr: str + :param load_balancer_sku: The load balancer sku for the managed cluster. Possible values + include: "standard", "basic". + :type load_balancer_sku: str or ~azure.mgmt.containerservice.v2019_04_01.models.LoadBalancerSku + """ + + _validation = { + 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, + 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + } + + _attribute_map = { + 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, + 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, + 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, + 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, + 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, + } + + def __init__( + self, + *, + network_plugin: Optional[Union[str, "NetworkPlugin"]] = "kubenet", + network_policy: Optional[Union[str, "NetworkPolicy"]] = None, + pod_cidr: Optional[str] = "10.244.0.0/16", + service_cidr: Optional[str] = "10.0.0.0/16", + dns_service_ip: Optional[str] = "10.0.0.10", + docker_bridge_cidr: Optional[str] = "172.17.0.1/16", + load_balancer_sku: Optional[Union[str, "LoadBalancerSku"]] = None, + **kwargs + ): + super(ContainerServiceNetworkProfile, self).__init__(**kwargs) + self.network_plugin = network_plugin + self.network_policy = network_policy + self.pod_cidr = pod_cidr + self.service_cidr = service_cidr + self.dns_service_ip = dns_service_ip + self.docker_bridge_cidr = docker_bridge_cidr + self.load_balancer_sku = load_balancer_sku + + +class ContainerServiceSshConfiguration(msrest.serialization.Model): + """SSH configuration for Linux-based VMs running on Azure. + + All required parameters must be populated in order to send to Azure. + + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. Only expect one key specified. + :type public_keys: + list[~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceSshPublicKey] + """ + + _validation = { + 'public_keys': {'required': True}, + } + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, + } + + def __init__( + self, + *, + public_keys: List["ContainerServiceSshPublicKey"], + **kwargs + ): + super(ContainerServiceSshConfiguration, self).__init__(**kwargs) + self.public_keys = public_keys + + +class ContainerServiceSshPublicKey(msrest.serialization.Model): + """Contains information about SSH certificate public key data. + + All required parameters must be populated in order to send to Azure. + + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. + :type key_data: str + """ + + _validation = { + 'key_data': {'required': True}, + } + + _attribute_map = { + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__( + self, + *, + key_data: str, + **kwargs + ): + super(ContainerServiceSshPublicKey, self).__init__(**kwargs) + self.key_data = key_data + + +class ContainerServiceVMDiagnostics(msrest.serialization.Model): + """Profile for diagnostics on the container service VMs. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. + :type enabled: bool + :ivar storage_uri: The URI of the storage account where diagnostics are stored. + :vartype storage_uri: str + """ + + _validation = { + 'enabled': {'required': True}, + 'storage_uri': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__( + self, + *, + enabled: bool, + **kwargs + ): + super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) + self.enabled = enabled + self.storage_uri = None + + +class CredentialResult(msrest.serialization.Model): + """The credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the credential. + :vartype name: str + :ivar value: Base64-encoded Kubernetes configuration file. + :vartype value: bytearray + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResult, self).__init__(**kwargs) + self.name = None + self.value = None + + +class CredentialResults(msrest.serialization.Model): + """The list of credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: list[~azure.mgmt.containerservice.v2019_04_01.models.CredentialResult] + """ + + _validation = { + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResults, self).__init__(**kwargs) + self.kubeconfigs = None + + +class Resource(msrest.serialization.Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ManagedCluster(Resource): + """Managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. + :type kubernetes_version: str + :param dns_prefix: DNS prefix specified when creating the managed cluster. + :type dns_prefix: str + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAgentPoolProfile] + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceLinuxProfile + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterWindowsProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterServicePrincipalProfile + :param addon_profiles: Profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAddonProfile] + :param node_resource_group: Name of the resource group containing agent pool nodes. + :type node_resource_group: str + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :type enable_rbac: bool + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. + :type enable_pod_security_policy: bool + :param network_profile: Profile of network configuration. + :type network_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceNetworkProfile + :param aad_profile: Profile of Azure Active Directory configuration. + :type aad_profile: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAADProfile + :param api_server_authorized_ip_ranges: (PREVIEW) Authorized IP Ranges to kubernetes API + server. + :type api_server_authorized_ip_ranges: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'max_agent_pools': {'readonly': True}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + 'api_server_authorized_ip_ranges': {'key': 'properties.apiServerAuthorizedIPRanges', 'type': '[str]'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedClusterIdentity"] = None, + kubernetes_version: Optional[str] = None, + dns_prefix: Optional[str] = None, + agent_pool_profiles: Optional[List["ManagedClusterAgentPoolProfile"]] = None, + linux_profile: Optional["ContainerServiceLinuxProfile"] = None, + windows_profile: Optional["ManagedClusterWindowsProfile"] = None, + service_principal_profile: Optional["ManagedClusterServicePrincipalProfile"] = None, + addon_profiles: Optional[Dict[str, "ManagedClusterAddonProfile"]] = None, + node_resource_group: Optional[str] = None, + enable_rbac: Optional[bool] = None, + enable_pod_security_policy: Optional[bool] = None, + network_profile: Optional["ContainerServiceNetworkProfile"] = None, + aad_profile: Optional["ManagedClusterAADProfile"] = None, + api_server_authorized_ip_ranges: Optional[List[str]] = None, + **kwargs + ): + super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.provisioning_state = None + self.max_agent_pools = None + self.kubernetes_version = kubernetes_version + self.dns_prefix = dns_prefix + self.fqdn = None + self.agent_pool_profiles = agent_pool_profiles + self.linux_profile = linux_profile + self.windows_profile = windows_profile + self.service_principal_profile = service_principal_profile + self.addon_profiles = addon_profiles + self.node_resource_group = node_resource_group + self.enable_rbac = enable_rbac + self.enable_pod_security_policy = enable_pod_security_policy + self.network_profile = network_profile + self.aad_profile = aad_profile + self.api_server_authorized_ip_ranges = api_server_authorized_ip_ranges + + +class ManagedClusterAADProfile(msrest.serialization.Model): + """AADProfile specifies attributes for Azure Active Directory integration. + + All required parameters must be populated in order to send to Azure. + + :param client_app_id: Required. The client AAD application ID. + :type client_app_id: str + :param server_app_id: Required. The server AAD application ID. + :type server_app_id: str + :param server_app_secret: The server AAD application secret. + :type server_app_secret: str + :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. + :type tenant_id: str + """ + + _validation = { + 'client_app_id': {'required': True}, + 'server_app_id': {'required': True}, + } + + _attribute_map = { + 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, + 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, + 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, + 'tenant_id': {'key': 'tenantID', 'type': 'str'}, + } + + def __init__( + self, + *, + client_app_id: str, + server_app_id: str, + server_app_secret: Optional[str] = None, + tenant_id: Optional[str] = None, + **kwargs + ): + super(ManagedClusterAADProfile, self).__init__(**kwargs) + self.client_app_id = client_app_id + self.server_app_id = server_app_id + self.server_app_secret = server_app_secret + self.tenant_id = tenant_id + + +class ManagedClusterAccessProfile(Resource): + """Managed cluster Access Profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param kube_config: Base64-encoded Kubernetes configuration file. + :type kube_config: bytearray + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytearray] = None, + **kwargs + ): + super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) + self.kube_config = kube_config + + +class ManagedClusterAddonProfile(msrest.serialization.Model): + """A Kubernetes add-on profile for a managed cluster. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the add-on is enabled or not. + :type enabled: bool + :param config: Key-value pairs for configuring an add-on. + :type config: dict[str, str] + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'config': {'key': 'config', 'type': '{str}'}, + } + + def __init__( + self, + *, + enabled: bool, + config: Optional[Dict[str, str]] = None, + **kwargs + ): + super(ManagedClusterAddonProfile, self).__init__(**kwargs) + self.enabled = enabled + self.config = config + + +class ManagedClusterAgentPoolProfileProperties(msrest.serialization.Model): + """Properties for the container service agent pool profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Required. Number of agents (VMs) to host docker containers. Allowed values must + be in the range of 1 to 100 (inclusive). The default value is 1. + :type count: int + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2019_04_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: Minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. + :type orchestrator_version: str + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param availability_zones: (PREVIEW) Availability zones for nodes. Must use + VirtualMachineScaleSets AgentPoolType. + :type availability_zones: list[str] + """ + + _validation = { + 'count': {'required': True, 'maximum': 100, 'minimum': 1}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'maxPods', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, + } + + def __init__( + self, + *, + count: int = 1, + vm_size: Union[str, "ContainerServiceVMSizeTypes"], + os_disk_size_gb: Optional[int] = None, + vnet_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type: Optional[Union[str, "AgentPoolType"]] = None, + orchestrator_version: Optional[str] = None, + availability_zones: Optional[List[str]] = None, + **kwargs + ): + super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) + self.count = count + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.vnet_subnet_id = vnet_subnet_id + self.max_pods = max_pods + self.os_type = os_type + self.max_count = max_count + self.min_count = min_count + self.enable_auto_scaling = enable_auto_scaling + self.type = type + self.orchestrator_version = orchestrator_version + self.provisioning_state = None + self.availability_zones = availability_zones + + +class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): + """Profile for the container service agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Required. Number of agents (VMs) to host docker containers. Allowed values must + be in the range of 1 to 100 (inclusive). The default value is 1. + :type count: int + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2019_04_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: Minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. + :type orchestrator_version: str + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param availability_zones: (PREVIEW) Availability zones for nodes. Must use + VirtualMachineScaleSets AgentPoolType. + :type availability_zones: list[str] + :param name: Required. Unique name of the agent pool profile in the context of the subscription + and resource group. + :type name: str + """ + + _validation = { + 'count': {'required': True, 'maximum': 100, 'minimum': 1}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'maxPods', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + count: int = 1, + vm_size: Union[str, "ContainerServiceVMSizeTypes"], + name: str, + os_disk_size_gb: Optional[int] = None, + vnet_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type: Optional[Union[str, "AgentPoolType"]] = None, + orchestrator_version: Optional[str] = None, + availability_zones: Optional[List[str]] = None, + **kwargs + ): + super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, orchestrator_version=orchestrator_version, availability_zones=availability_zones, **kwargs) + self.name = name + + +class ManagedClusterIdentity(msrest.serialization.Model): + """Identity for the managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of the system assigned identity which is used by master + components. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the system assigned identity which is used by master + components. + :vartype tenant_id: str + :param type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use + an implicitly created identity in master components and an auto-created user assigned identity + in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, + service principal will be used instead. Possible values include: "SystemAssigned", "None". + :type type: str or ~azure.mgmt.containerservice.v2019_04_01.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ResourceIdentityType"]] = None, + **kwargs + ): + super(ManagedClusterIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class ManagedClusterListResult(msrest.serialization.Model): + """The response from the List Managed Clusters operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of managed clusters. + :type value: list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] + :ivar next_link: The URL to get the next set of managed cluster results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ManagedCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ManagedCluster"]] = None, + **kwargs + ): + super(ManagedClusterListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ManagedClusterPoolUpgradeProfile(msrest.serialization.Model): + """The list of available upgrade versions. + + All required parameters must be populated in order to send to Azure. + + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). + :type kubernetes_version: str + :param name: Pool name. + :type name: str + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2019_04_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. + :type upgrades: + list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] + """ + + _validation = { + 'kubernetes_version': {'required': True}, + 'os_type': {'required': True}, + } + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, + } + + def __init__( + self, + *, + kubernetes_version: str, + os_type: Union[str, "OSType"] = "Linux", + name: Optional[str] = None, + upgrades: Optional[List["ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, + **kwargs + ): + super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) + self.kubernetes_version = kubernetes_version + self.name = name + self.os_type = os_type + self.upgrades = upgrades + + +class ManagedClusterPoolUpgradeProfileUpgradesItem(msrest.serialization.Model): + """ManagedClusterPoolUpgradeProfileUpgradesItem. + + :param kubernetes_version: Kubernetes version (major, minor, patch). + :type kubernetes_version: str + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + *, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): + super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) + self.kubernetes_version = kubernetes_version + self.is_preview = is_preview + + +class ManagedClusterServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The ID for the service principal. + :type client_id: str + :param secret: The secret password associated with the service principal in plain text. + :type secret: str + """ + + _validation = { + 'client_id': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + } + + def __init__( + self, + *, + client_id: str, + secret: Optional[str] = None, + **kwargs + ): + super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) + self.client_id = client_id + self.secret = secret + + +class ManagedClusterUpgradeProfile(msrest.serialization.Model): + """The list of available upgrades for compute pools. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Id of upgrade profile. + :vartype id: str + :ivar name: Name of upgrade profile. + :vartype name: str + :ivar type: Type of upgrade profile. + :vartype type: str + :param control_plane_profile: Required. The list of available upgrade versions for the control + plane. + :type control_plane_profile: + ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfile + :param agent_pool_profiles: Required. The list of available upgrade versions for agent pools. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfile] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'control_plane_profile': {'required': True}, + 'agent_pool_profiles': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, + } + + def __init__( + self, + *, + control_plane_profile: "ManagedClusterPoolUpgradeProfile", + agent_pool_profiles: List["ManagedClusterPoolUpgradeProfile"], + **kwargs + ): + super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.control_plane_profile = control_plane_profile + self.agent_pool_profiles = agent_pool_profiles + + +class ManagedClusterWindowsProfile(msrest.serialization.Model): + """Profile for Windows VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. Specifies the name of the administrator account. + :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", + "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", + "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + "sys", "test2", "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 + character :code:`
`:code:`
` **Max-length:** 20 characters. + :type admin_username: str + :param admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` + **Max-length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". + :type admin_password: str + """ + + _validation = { + 'admin_username': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + } + + def __init__( + self, + *, + admin_username: str, + admin_password: Optional[str] = None, + **kwargs + ): + super(ManagedClusterWindowsProfile, self).__init__(**kwargs) + self.admin_username = admin_username + self.admin_password = admin_password + + +class OperationListResult(msrest.serialization.Model): + """The List Compute Operation operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of compute operations. + :vartype value: list[~azure.mgmt.containerservice.v2019_04_01.models.OperationValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationValue]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + + +class OperationValue(msrest.serialization.Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class TagsObject(msrest.serialization.Model): + """Tags object for patch operations. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(TagsObject, self).__init__(**kwargs) + self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/agent_pool.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/agent_pool.py deleted file mode 100644 index 03a85e8c21c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/agent_pool.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/agent_pool_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/agent_pool_paged.py deleted file mode 100644 index 860cd686515..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/agent_pool_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/agent_pool_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/agent_pool_py3.py deleted file mode 100644 index 1bac16e4e2d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/agent_pool_py3.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, orchestrator_version: str=None, availability_zones=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_client_enums.py deleted file mode 100644 index 08f49fc4a07..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_client_enums.py +++ /dev/null @@ -1,232 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - none = "None" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_diagnostics_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_diagnostics_profile.py deleted file mode 100644 index 01e83dba9c9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_diagnostics_profile.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_diagnostics_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_diagnostics_profile_py3.py deleted file mode 100644 index 50b20fe72bc..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_diagnostics_profile_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_linux_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_linux_profile.py deleted file mode 100644 index 2a4eac15b01..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_linux_profile.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_linux_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_linux_profile_py3.py deleted file mode 100644 index 86130b9472b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_linux_profile_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_master_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_master_profile.py deleted file mode 100644 index 0694a0309fb..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_master_profile.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_master_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_master_profile_py3.py deleted file mode 100644 index f8645cc11df..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_master_profile_py3.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_network_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_network_profile.py deleted file mode 100644 index 39f46d59a3b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_network_profile.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2019_04_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2019_04_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2019_04_01.models.LoadBalancerSku - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_network_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_network_profile_py3.py deleted file mode 100644 index 2876203d783..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_network_profile_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2019_04_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2019_04_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2019_04_01.models.LoadBalancerSku - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", load_balancer_sku=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.load_balancer_sku = load_balancer_sku diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_configuration.py deleted file mode 100644 index be8eb5b7792..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_configuration.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_configuration_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_configuration_py3.py deleted file mode 100644 index feeb3b049fa..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_configuration_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_public_key.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_public_key.py deleted file mode 100644 index da7609ba222..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_public_key.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_public_key_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_public_key_py3.py deleted file mode 100644 index 8e8c10544ef..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_ssh_public_key_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_vm_diagnostics.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_vm_diagnostics.py deleted file mode 100644 index f1804c66b68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_vm_diagnostics.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_vm_diagnostics_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_vm_diagnostics_py3.py deleted file mode 100644 index a716fc26954..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_vm_diagnostics_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_result.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_result.py deleted file mode 100644 index 89e748b481b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_result.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_result_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_result_py3.py deleted file mode 100644 index 6f387834bf0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_result_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_results.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_results.py deleted file mode 100644 index 9ed4c77f4bf..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_results.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2019_04_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_results_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_results_py3.py deleted file mode 100644 index 68e0b9ff555..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/credential_results_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2019_04_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster.py deleted file mode 100644 index 04fed66d87e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAADProfile - :param api_server_authorized_ip_ranges: (PREVIEW) Authorized IP Ranges to - kubernetes API server. - :type api_server_authorized_ip_ranges: list[str] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_authorized_ip_ranges': {'key': 'properties.apiServerAuthorizedIPRanges', 'type': '[str]'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.api_server_authorized_ip_ranges = kwargs.get('api_server_authorized_ip_ranges', None) - self.identity = kwargs.get('identity', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_aad_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_aad_profile.py deleted file mode 100644 index 6a48639de34..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_aad_profile.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_aad_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_aad_profile_py3.py deleted file mode 100644 index 76289f3ddc3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_aad_profile_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_access_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_access_profile.py deleted file mode 100644 index 6dc2a4ec23b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_access_profile.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_access_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_access_profile_py3.py deleted file mode 100644 index 0d3fb998e97..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_access_profile_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_addon_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_addon_profile.py deleted file mode 100644 index 796f9246a68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_addon_profile.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_addon_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_addon_profile_py3.py deleted file mode 100644 index 71e05cd14c0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_addon_profile_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile.py deleted file mode 100644 index 4ea015c040e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile.py +++ /dev/null @@ -1,144 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .managed_cluster_agent_pool_profile_properties import ManagedClusterAgentPoolProfileProperties - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile_properties.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile_properties.py deleted file mode 100644 index 616bd6ecd3d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile_properties.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile_properties_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile_properties_py3.py deleted file mode 100644 index d1c82e61b78..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile_properties_py3.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile_py3.py deleted file mode 100644 index 7a9b76c7b83..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_agent_pool_profile_py3.py +++ /dev/null @@ -1,144 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .managed_cluster_agent_pool_profile_properties_py3 import ManagedClusterAgentPoolProfileProperties - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, vm_size, name: str, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, orchestrator_version=orchestrator_version, availability_zones=availability_zones, **kwargs) - self.name = name diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_identity.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_identity.py deleted file mode 100644 index ab0ac7ab5b0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_identity.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_identity_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_identity_py3.py deleted file mode 100644 index 60c1046ad87..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_identity_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_paged.py deleted file mode 100644 index 854cd481b63..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile.py deleted file mode 100644 index c646d144b41..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile_py3.py deleted file mode 100644 index b6644b2036a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_04_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile_upgrades_item.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile_upgrades_item.py deleted file mode 100644 index 1d56a858065..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile_upgrades_item.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile_upgrades_item_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile_upgrades_item_py3.py deleted file mode 100644 index b3f79806494..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_pool_upgrade_profile_upgrades_item_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_py3.py deleted file mode 100644 index 10071d84902..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_py3.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAADProfile - :param api_server_authorized_ip_ranges: (PREVIEW) Authorized IP Ranges to - kubernetes API server. - :type api_server_authorized_ip_ranges: list[str] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_authorized_ip_ranges': {'key': 'properties.apiServerAuthorizedIPRanges', 'type': '[str]'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, api_server_authorized_ip_ranges=None, identity=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.api_server_authorized_ip_ranges = api_server_authorized_ip_ranges - self.identity = identity diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_service_principal_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_service_principal_profile.py deleted file mode 100644 index 4610cedac54..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_service_principal_profile.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_service_principal_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_service_principal_profile_py3.py deleted file mode 100644 index 6ea9e92dc40..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_service_principal_profile_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_upgrade_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_upgrade_profile.py deleted file mode 100644 index b4966031a07..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_upgrade_profile.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_upgrade_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_upgrade_profile_py3.py deleted file mode 100644 index 3cd2d047c4c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_upgrade_profile_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_windows_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_windows_profile.py deleted file mode 100644 index 2f955d4ef52..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_windows_profile.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_windows_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_windows_profile_py3.py deleted file mode 100644 index 4dd22c95859..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/managed_cluster_windows_profile_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/operation_value.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/operation_value.py deleted file mode 100644 index 911f9fc8088..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/operation_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/operation_value_paged.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/operation_value_paged.py deleted file mode 100644 index 3242947b178..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/operation_value_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/operation_value_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/operation_value_py3.py deleted file mode 100644 index 55bceaa7543..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/operation_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_profile.py deleted file mode 100644 index ed7eda48c46..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_profile.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorProfile(Model): - """Contains information about orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _validation = { - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(OrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = kwargs.get('orchestrator_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.is_preview = kwargs.get('is_preview', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_profile_py3.py deleted file mode 100644 index 3dd9fb586ae..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_profile_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorProfile(Model): - """Contains information about orchestrator. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _validation = { - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, orchestrator_version: str, orchestrator_type: str=None, is_preview: bool=None, **kwargs) -> None: - super(OrchestratorProfile, self).__init__(**kwargs) - self.orchestrator_type = orchestrator_type - self.orchestrator_version = orchestrator_version - self.is_preview = is_preview diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile.py deleted file mode 100644 index eec16d09f99..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorVersionProfile(Model): - """The profile of an orchestrator and its available versions. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - :param default: Installed by default if version is not specified. - :type default: bool - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - :param upgrades: The list of available upgrade versions. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_04_01.models.OrchestratorProfile] - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'default': {'key': 'default', 'type': 'bool'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - 'upgrades': {'key': 'upgrades', 'type': '[OrchestratorProfile]'}, - } - - def __init__(self, **kwargs): - super(OrchestratorVersionProfile, self).__init__(**kwargs) - self.orchestrator_type = kwargs.get('orchestrator_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.default = kwargs.get('default', None) - self.is_preview = kwargs.get('is_preview', None) - self.upgrades = kwargs.get('upgrades', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile_list_result.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile_list_result.py deleted file mode 100644 index 22055e165f7..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile_list_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorVersionProfileListResult(Model): - """The list of versions for supported orchestrators. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the orchestrator version profile list result. - :vartype id: str - :ivar name: Name of the orchestrator version profile list result. - :vartype name: str - :ivar type: Type of the orchestrator version profile list result. - :vartype type: str - :param orchestrators: Required. List of orchestrator version profiles. - :type orchestrators: - list[~azure.mgmt.containerservice.v2019_04_01.models.OrchestratorVersionProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'orchestrators': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrators': {'key': 'properties.orchestrators', 'type': '[OrchestratorVersionProfile]'}, - } - - def __init__(self, **kwargs): - super(OrchestratorVersionProfileListResult, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.orchestrators = kwargs.get('orchestrators', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile_list_result_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile_list_result_py3.py deleted file mode 100644 index 1245185edec..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile_list_result_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorVersionProfileListResult(Model): - """The list of versions for supported orchestrators. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the orchestrator version profile list result. - :vartype id: str - :ivar name: Name of the orchestrator version profile list result. - :vartype name: str - :ivar type: Type of the orchestrator version profile list result. - :vartype type: str - :param orchestrators: Required. List of orchestrator version profiles. - :type orchestrators: - list[~azure.mgmt.containerservice.v2019_04_01.models.OrchestratorVersionProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'orchestrators': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrators': {'key': 'properties.orchestrators', 'type': '[OrchestratorVersionProfile]'}, - } - - def __init__(self, *, orchestrators, **kwargs) -> None: - super(OrchestratorVersionProfileListResult, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.orchestrators = orchestrators diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile_py3.py deleted file mode 100644 index 0ea9efab416..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/orchestrator_version_profile_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OrchestratorVersionProfile(Model): - """The profile of an orchestrator and its available versions. - - All required parameters must be populated in order to send to Azure. - - :param orchestrator_type: Required. Orchestrator type. - :type orchestrator_type: str - :param orchestrator_version: Required. Orchestrator version (major, minor, - patch). - :type orchestrator_version: str - :param default: Installed by default if version is not specified. - :type default: bool - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - :param upgrades: The list of available upgrade versions. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_04_01.models.OrchestratorProfile] - """ - - _validation = { - 'orchestrator_type': {'required': True}, - 'orchestrator_version': {'required': True}, - } - - _attribute_map = { - 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'default': {'key': 'default', 'type': 'bool'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - 'upgrades': {'key': 'upgrades', 'type': '[OrchestratorProfile]'}, - } - - def __init__(self, *, orchestrator_type: str, orchestrator_version: str, default: bool=None, is_preview: bool=None, upgrades=None, **kwargs) -> None: - super(OrchestratorVersionProfile, self).__init__(**kwargs) - self.orchestrator_type = orchestrator_type - self.orchestrator_version = orchestrator_version - self.default = default - self.is_preview = is_preview - self.upgrades = upgrades diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/resource.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/resource.py deleted file mode 100644 index 5dd7d481c68..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/resource_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/resource_py3.py deleted file mode 100644 index 2f3702caf60..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/sub_resource.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/sub_resource.py deleted file mode 100644 index a3f389ba0ba..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/sub_resource.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/sub_resource_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/sub_resource_py3.py deleted file mode 100644 index 9d61511ee2a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/sub_resource_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/tags_object.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/tags_object.py deleted file mode 100644 index 2966ec220f9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/tags_object.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/tags_object_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/tags_object_py3.py deleted file mode 100644 index 8be0bb4a15d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/tags_object_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/__init__.py old mode 100644 new mode 100755 index 6feafb436e6..5aac40228ee --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/__init__.py @@ -1,22 +1,17 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .managed_clusters_operations import ManagedClustersOperations -from .agent_pools_operations import AgentPoolsOperations -from .container_services_operations import ContainerServicesOperations +from ._operations import Operations +from ._managed_clusters_operations import ManagedClustersOperations +from ._agent_pools_operations import AgentPoolsOperations __all__ = [ 'Operations', 'ManagedClustersOperations', 'AgentPoolsOperations', - 'ContainerServicesOperations', ] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/_agent_pools_operations.py new file mode 100755 index 00000000000..726d0444d0b --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/_agent_pools_operations.py @@ -0,0 +1,449 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class AgentPoolsOperations(object): + """AgentPoolsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2019_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AgentPoolListResult"] + """Gets a list of agent pools in the specified managed cluster. + + Gets a list of agent pools in the specified managed cluster. The operation returns properties + of each agent pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPoolListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AgentPoolListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} # type: ignore + + def get( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPool" + """Gets the agent pool. + + Gets the details of the agent pool by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPool, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.AgentPool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + parameters, # type: "_models.AgentPool" + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPool" + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AgentPool') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + parameters, # type: "_models.AgentPool" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AgentPool"] + """Creates or updates an agent pool. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :param parameters: Parameters supplied to the Create or Update an agent pool operation. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.AgentPool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2019_04_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes an agent pool. + + Deletes the agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/_managed_clusters_operations.py new file mode 100755 index 00000000000..31e63da00d3 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/_managed_clusters_operations.py @@ -0,0 +1,1122 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ManagedClustersOperations(object): + """ManagedClustersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2019_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedClusterListResult"] + """Gets a list of managed clusters in the specified subscription. + + Gets a list of managed clusters in the specified subscription. The operation returns properties + of each managed cluster. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedClusterListResult"] + """Lists managed clusters in the specified subscription and resource group. + + Lists managed clusters in the specified subscription and resource group. The operation returns + properties of each managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + def get_upgrade_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedClusterUpgradeProfile" + """Gets upgrade profile for a managed cluster. + + Gets the details of the upgrade profile for a managed cluster with a specified resource group + and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.get_upgrade_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterUpgradeProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} # type: ignore + + def get_access_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + role_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedClusterAccessProfile" + """Gets an access profile of a managed cluster. + + Gets the accessProfile for the specified role name of the managed cluster with a specified + resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param role_name: The name of the role for managed cluster accessProfile resource. + :type role_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAccessProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterAccessProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.get_access_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterAccessProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} # type: ignore + + def list_cluster_admin_credentials( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" + """Gets cluster admin credential of a managed cluster. + + Gets cluster admin credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_admin_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} # type: ignore + + def list_cluster_user_credentials( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" + """Gets cluster user credential of a managed cluster. + + Gets cluster user credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} # type: ignore + + def get( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" + """Gets a managed cluster. + + Gets the details of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedCluster, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedCluster" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedCluster') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedCluster" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ManagedCluster"] + """Creates or updates a managed cluster. + + Creates or updates a managed cluster with the specified configuration for agents and Kubernetes + version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def _update_tags_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_tags_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def begin_update_tags( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ManagedCluster"] + """Updates tags on a managed cluster. + + Updates a managed cluster with the specified tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a managed cluster. + + Deletes the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def _reset_service_principal_profile_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterServicePrincipalProfile" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_service_principal_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_service_principal_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + def begin_reset_service_principal_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterServicePrincipalProfile" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Reset Service Principal Profile of a managed cluster. + + Update the service principal Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a + Managed Cluster. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterServicePrincipalProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_service_principal_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + def _reset_aad_profile_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterAADProfile" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_aad_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_aad_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + def begin_reset_aad_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterAADProfile" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Reset AAD Profile of a managed cluster. + + Update the AAD Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed + Cluster. + :type parameters: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAADProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_aad_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/_operations.py new file mode 100755 index 00000000000..5019cf30003 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/_operations.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class Operations(object): + """Operations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2019_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OperationListResult"] + """Gets a list of compute operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2019_04_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2019-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/container_services_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/container_services_operations.py deleted file mode 100644 index ccd56822682..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/container_services_operations.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ContainerServicesOperations(object): - """ContainerServicesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01" - - self.config = config - - def list_orchestrators( - self, location, resource_type=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported orchestrators in the specified subscription. - - Gets a list of supported orchestrators in the specified subscription. - The operation returns properties of each orchestrator including - version, available upgrades and whether that version or upgrades are in - preview. - - :param location: The name of a supported Azure region. - :type location: str - :param resource_type: resource type for which the list of - orchestrators needs to be returned - :type resource_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OrchestratorVersionProfileListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_04_01.models.OrchestratorVersionProfileListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_orchestrators.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if resource_type is not None: - query_parameters['resource-type'] = self._serialize.query("resource_type", resource_type, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OrchestratorVersionProfileListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_orchestrators.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/operations.py deleted file mode 100644 index 938b64e8f62..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/operations.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2019_04_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2019_04_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/_container_service_client.py deleted file mode 100644 index 1b24da013b7..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/_container_service_client.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import AgentPoolsOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2019_08_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2019_08_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2019_08_01.operations.AgentPoolsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-08-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/__init__.py deleted file mode 100644 index 48e637b7940..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/__init__.py +++ /dev/null @@ -1,152 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import SubResource - from ._models_py3 import TagsObject -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import TagsObject -from ._paged_models import AgentPoolPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, - ScaleSetPriority, - ScaleSetEvictionPolicy, - NetworkPlugin, - NetworkPolicy, - LoadBalancerSku, - ResourceIdentityType, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterIdentity', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'Resource', - 'ResourceReference', - 'SubResource', - 'TagsObject', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'NetworkPlugin', - 'NetworkPolicy', - 'LoadBalancerSku', - 'ResourceIdentityType', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_container_service_client_enums.py deleted file mode 100644 index aa6915a8def..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class ScaleSetPriority(str, Enum): - - low = "Low" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - none = "None" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_models.py deleted file mode 100644 index 4c0109fc000..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_models.py +++ /dev/null @@ -1,1781 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.node_taints = kwargs.get('node_taints', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2019_08_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2019_08_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2019_08_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2019_08_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2019_08_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2019_08_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAADProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAPIServerAccessProfile - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.identity = kwargs.get('identity', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.node_taints = kwargs.get('node_taints', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2019_08_01.models.ResourceReference] - """ - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2019_08_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2019_08_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_models_py3.py deleted file mode 100644 index 74045b0ca16..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_models_py3.py +++ /dev/null @@ -1,1781 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", node_taints=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.node_taints = node_taints - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2019_08_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2019_08_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2019_08_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2019_08_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2019_08_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2019_08_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAADProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAPIServerAccessProfile - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, api_server_access_profile=None, identity=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.api_server_access_profile = api_server_access_profile - self.identity = identity - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.node_taints = node_taints - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, vm_size, name: str, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, orchestrator_version=orchestrator_version, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, node_taints=node_taints, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2019_08_01.models.ResourceReference] - """ - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2019_08_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2019_08_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_08_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_paged_models.py deleted file mode 100644 index 7a0bf6178a3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/__init__.py deleted file mode 100644 index d1b67f7888b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._managed_clusters_operations import ManagedClustersOperations -from ._agent_pools_operations import AgentPoolsOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', - 'AgentPoolsOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/_agent_pools_operations.py deleted file mode 100644 index 4b0c67ec86c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,514 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2019_08_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2019_08_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_08_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_08_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/availableAgentPoolVersions'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/_managed_clusters_operations.py deleted file mode 100644 index 45981b993c0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,988 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-08-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-08-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_08_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2019_08_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/version.py deleted file mode 100644 index b99c58c616c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2019-08-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/_container_service_client.py deleted file mode 100644 index 7fa72ba83f4..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/_container_service_client.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import AgentPoolsOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2019_10_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2019_10_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2019_10_01.operations.AgentPoolsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-10-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/__init__.py deleted file mode 100644 index 48e637b7940..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/__init__.py +++ /dev/null @@ -1,152 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import SubResource - from ._models_py3 import TagsObject -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import TagsObject -from ._paged_models import AgentPoolPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, - ScaleSetPriority, - ScaleSetEvictionPolicy, - NetworkPlugin, - NetworkPolicy, - LoadBalancerSku, - ResourceIdentityType, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterIdentity', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'Resource', - 'ResourceReference', - 'SubResource', - 'TagsObject', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'NetworkPlugin', - 'NetworkPolicy', - 'LoadBalancerSku', - 'ResourceIdentityType', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_container_service_client_enums.py deleted file mode 100644 index aa6915a8def..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class ScaleSetPriority(str, Enum): - - low = "Low" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - none = "None" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_models.py deleted file mode 100644 index 09b26f78d26..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_models.py +++ /dev/null @@ -1,1786 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.node_taints = kwargs.get('node_taints', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2019_10_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2019_10_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2019_10_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2019_10_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2019_10_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2019_10_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAADProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAPIServerAccessProfile - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.identity = kwargs.get('identity', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.node_taints = kwargs.get('node_taints', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2019_10_01.models.ResourceReference] - """ - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2019_10_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2019_10_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_models_py3.py deleted file mode 100644 index b5a92a16a2a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_models_py3.py +++ /dev/null @@ -1,1786 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", node_taints=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.node_taints = node_taints - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2019_10_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2019_10_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2019_10_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2019_10_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2019_10_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2019_10_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAADProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAPIServerAccessProfile - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, api_server_access_profile=None, identity=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.api_server_access_profile = api_server_access_profile - self.identity = identity - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - """ - - _validation = { - 'enabled': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.node_taints = node_taints - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: (PREVIEW) Availability zones for nodes. Must - use VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ScaleSetEvictionPolicy - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, vm_size, name: str, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, orchestrator_version=orchestrator_version, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, node_taints=node_taints, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2019_10_01.models.ResourceReference] - """ - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2019_10_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2019_10_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2019_10_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_paged_models.py deleted file mode 100644 index ea9bb9008ff..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/__init__.py deleted file mode 100644 index d1b67f7888b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._managed_clusters_operations import ManagedClustersOperations -from ._agent_pools_operations import AgentPoolsOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', - 'AgentPoolsOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/_agent_pools_operations.py deleted file mode 100644 index c9dbdd83076..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,511 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-10-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2019_10_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2019_10_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_10_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_10_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/_managed_clusters_operations.py deleted file mode 100644 index 140c54a4529..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1134 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-10-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_10_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2019_10_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/version.py deleted file mode 100644 index f0880ef4951..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2019-10-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/_container_service_client.py deleted file mode 100644 index ce5db51f7e3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/_container_service_client.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import AgentPoolsOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2020_01_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2020_01_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2020_01_01.operations.AgentPoolsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-01-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/__init__.py deleted file mode 100644 index 671f9f9401d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/__init__.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAddonProfileIdentity - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import SubResource - from ._models_py3 import TagsObject - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import TagsObject - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, - ScaleSetPriority, - ScaleSetEvictionPolicy, - NetworkPlugin, - NetworkPolicy, - OutboundType, - LoadBalancerSku, - ResourceIdentityType, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAddonProfileIdentity', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterIdentity', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'Resource', - 'ResourceReference', - 'SubResource', - 'TagsObject', - 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'NetworkPlugin', - 'NetworkPolicy', - 'OutboundType', - 'LoadBalancerSku', - 'ResourceIdentityType', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_container_service_client_enums.py deleted file mode 100644 index 1f16ba53a9b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,250 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class ScaleSetPriority(str, Enum): - - low = "Low" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - none = "None" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_models.py deleted file mode 100644 index 5a036d538db..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_models.py +++ /dev/null @@ -1,1924 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetEvictionPolicy - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_01_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_01_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_01_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_01_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_01_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.outbound_type = kwargs.get('outbound_type', "loadBalancer") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_01_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAADProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) - self.identity_profile = kwargs.get('identity_profile', None) - self.identity = kwargs.get('identity', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetEvictionPolicy - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetEvictionPolicy - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_01_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_01_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_01_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_models_py3.py deleted file mode 100644 index 8e8fe49b76d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_models_py3.py +++ /dev/null @@ -1,1924 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetEvictionPolicy - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_01_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_01_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_01_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_01_01.models.NetworkPolicy - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_01_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.outbound_type = outbound_type - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_01_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAADProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, identity=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.api_server_access_profile = api_server_access_profile - self.disk_encryption_set_id = disk_encryption_set_id - self.identity_profile = identity_profile - self.identity = identity - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetEvictionPolicy - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for low priority virtual machine scale set. - Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ScaleSetEvictionPolicy - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, vm_size, name: str, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, orchestrator_version=orchestrator_version, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, tags=tags, node_labels=node_labels, node_taints=node_taints, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_01_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - self.allocated_outbound_ports = allocated_outbound_ports - self.idle_timeout_in_minutes = idle_timeout_in_minutes - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_01_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_01_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_01_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_paged_models.py deleted file mode 100644 index b665e1d7374..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/__init__.py deleted file mode 100644 index d1b67f7888b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._managed_clusters_operations import ManagedClustersOperations -from ._agent_pools_operations import AgentPoolsOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', - 'AgentPoolsOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/_agent_pools_operations.py deleted file mode 100644 index fd546934dd5..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,511 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-01-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2020_01_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_01_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_01_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_01_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/_managed_clusters_operations.py deleted file mode 100644 index a2214fb5ecd..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1134 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-01-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_01_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2020_01_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/_operations.py deleted file mode 100644 index 6b5107c85ee..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-01-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2020_01_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2020_01_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/version.py deleted file mode 100644 index b25da413d3a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_01_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2020-01-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/_container_service_client.py deleted file mode 100644 index 7f744a9e6c5..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/_container_service_client.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import AgentPoolsOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2020_02_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2020_02_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2020_02_01.operations.AgentPoolsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-02-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/__init__.py deleted file mode 100644 index 671e627031d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/__init__.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAddonProfileIdentity - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import SubResource - from ._models_py3 import TagsObject - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import TagsObject - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, - ScaleSetPriority, - ScaleSetEvictionPolicy, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, - LoadBalancerSku, - ResourceIdentityType, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAddonProfileIdentity', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterIdentity', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'Resource', - 'ResourceReference', - 'SubResource', - 'TagsObject', - 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', - 'LoadBalancerSku', - 'ResourceIdentityType', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_container_service_client_enums.py deleted file mode 100644 index 50453fcda77..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,257 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - low = "Low" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - none = "None" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_models.py deleted file mode 100644 index 8de59fafd3e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_models.py +++ /dev/null @@ -1,2000 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_02_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_02_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_02_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_02_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_02_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_02_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.network_mode = kwargs.get('network_mode', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.outbound_type = kwargs.get('outbound_type', "loadBalancer") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_02_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) - self.identity_profile = kwargs.get('identity_profile', None) - self.identity = kwargs.get('identity', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_02_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_02_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_02_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - """ - - _attribute_map = { - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.scan_interval = kwargs.get('scan_interval', None) - self.scale_down_delay_after_add = kwargs.get('scale_down_delay_after_add', None) - self.scale_down_delay_after_delete = kwargs.get('scale_down_delay_after_delete', None) - self.scale_down_delay_after_failure = kwargs.get('scale_down_delay_after_failure', None) - self.scale_down_unneeded_time = kwargs.get('scale_down_unneeded_time', None) - self.scale_down_unready_time = kwargs.get('scale_down_unready_time', None) - self.scale_down_utilization_threshold = kwargs.get('scale_down_utilization_threshold', None) - self.max_graceful_termination_sec = kwargs.get('max_graceful_termination_sec', None) - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_models_py3.py deleted file mode 100644 index 6f8b2a412c3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_models_py3.py +++ /dev/null @@ -1,2000 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_02_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_02_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_02_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_02_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_02_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_02_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.network_mode = network_mode - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.outbound_type = outbound_type - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_02_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, identity=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.auto_scaler_profile = auto_scaler_profile - self.api_server_access_profile = api_server_access_profile - self.disk_encryption_set_id = disk_encryption_set_id - self.identity_profile = identity_profile - self.identity = identity - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - All required parameters must be populated in order to send to Azure. - - :param client_app_id: Required. The client AAD application ID. - :type client_app_id: str - :param server_app_id: Required. The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _validation = { - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 1 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolType - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, vm_size, name: str, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, orchestrator_version=orchestrator_version, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_02_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - self.allocated_outbound_ports = allocated_outbound_ports - self.idle_timeout_in_minutes = idle_timeout_in_minutes - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_02_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_02_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - """ - - _attribute_map = { - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - } - - def __init__(self, *, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, max_graceful_termination_sec: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.scan_interval = scan_interval - self.scale_down_delay_after_add = scale_down_delay_after_add - self.scale_down_delay_after_delete = scale_down_delay_after_delete - self.scale_down_delay_after_failure = scale_down_delay_after_failure - self.scale_down_unneeded_time = scale_down_unneeded_time - self.scale_down_unready_time = scale_down_unready_time - self.scale_down_utilization_threshold = scale_down_utilization_threshold - self.max_graceful_termination_sec = max_graceful_termination_sec - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_paged_models.py deleted file mode 100644 index 5d90997da62..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/_managed_clusters_operations.py deleted file mode 100644 index 47a0a3d7734..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1134 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_02_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2020_02_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/_operations.py deleted file mode 100644 index 8d979dcf503..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2020_02_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/version.py deleted file mode 100644 index 5bb7dbc2923..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2020-02-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/_container_service_client.py deleted file mode 100644 index 112dfe36bd0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/_container_service_client.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import AgentPoolsOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2020_03_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2020_03_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2020_03_01.operations.AgentPoolsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-03-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/__init__.py deleted file mode 100644 index 89500883421..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/__init__.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAddonProfileIdentity - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterSKU - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import SubResource - from ._models_py3 import TagsObject - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterSKU - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import TagsObject - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, - AgentPoolMode, - ScaleSetPriority, - ScaleSetEvictionPolicy, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, - LoadBalancerSku, - ResourceIdentityType, - ManagedClusterSKUName, - ManagedClusterSKUTier, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAddonProfileIdentity', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterIdentity', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterSKU', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'Resource', - 'ResourceReference', - 'SubResource', - 'TagsObject', - 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', - 'AgentPoolMode', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', - 'LoadBalancerSku', - 'ResourceIdentityType', - 'ManagedClusterSKUName', - 'ManagedClusterSKUTier', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_container_service_client_enums.py deleted file mode 100644 index de84d5d535e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,274 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class AgentPoolMode(str, Enum): - - system = "System" - user = "User" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - low = "Low" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - none = "None" - - -class ManagedClusterSKUName(str, Enum): - - basic = "Basic" - - -class ManagedClusterSKUTier(str, Enum): - - paid = "Paid" - free = "Free" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_models.py deleted file mode 100644 index 574edaefa33..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_models.py +++ /dev/null @@ -1,2052 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_03_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_03_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_03_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_03_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_03_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_03_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.network_mode = kwargs.get('network_mode', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.outbound_type = kwargs.get('outbound_type', "loadBalancer") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_03_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) - self.identity_profile = kwargs.get('identity_profile', None) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = kwargs.get('managed', None) - self.admin_group_object_ids = kwargs.get('admin_group_object_ids', None) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_03_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_03_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_03_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) - self.scan_interval = kwargs.get('scan_interval', None) - self.scale_down_delay_after_add = kwargs.get('scale_down_delay_after_add', None) - self.scale_down_delay_after_delete = kwargs.get('scale_down_delay_after_delete', None) - self.scale_down_delay_after_failure = kwargs.get('scale_down_delay_after_failure', None) - self.scale_down_unneeded_time = kwargs.get('scale_down_unneeded_time', None) - self.scale_down_unready_time = kwargs.get('scale_down_unready_time', None) - self.scale_down_utilization_threshold = kwargs.get('scale_down_utilization_threshold', None) - self.max_graceful_termination_sec = kwargs.get('max_graceful_termination_sec', None) - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_models_py3.py deleted file mode 100644 index 283955ed3b7..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_models_py3.py +++ /dev/null @@ -1,2052 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, mode=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_03_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_03_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_03_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_03_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_03_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_03_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.network_mode = network_mode - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.outbound_type = outbound_type - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_03_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, identity=None, sku=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.auto_scaler_profile = auto_scaler_profile - self.api_server_access_profile = api_server_access_profile - self.disk_encryption_set_id = disk_encryption_set_id - self.identity_profile = identity_profile - self.identity = identity - self.sku = sku - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, managed: bool=None, admin_group_object_ids=None, client_app_id: str=None, server_app_id: str=None, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = managed - self.admin_group_object_ids = admin_group_object_ids - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Low', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot or low priority virtual machine scale - set. Default to Delete. Possible values include: 'Delete', 'Deallocate'. - Default value: "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, vm_size, name: str, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_03_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - self.allocated_outbound_ports = allocated_outbound_ports - self.idle_timeout_in_minutes = idle_timeout_in_minutes - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_03_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_03_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_03_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - } - - def __init__(self, *, balance_similar_node_groups: str=None, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, max_graceful_termination_sec: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = balance_similar_node_groups - self.scan_interval = scan_interval - self.scale_down_delay_after_add = scale_down_delay_after_add - self.scale_down_delay_after_delete = scale_down_delay_after_delete - self.scale_down_delay_after_failure = scale_down_delay_after_failure - self.scale_down_unneeded_time = scale_down_unneeded_time - self.scale_down_unready_time = scale_down_unready_time - self.scale_down_utilization_threshold = scale_down_utilization_threshold - self.max_graceful_termination_sec = max_graceful_termination_sec - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, tier=None, **kwargs) -> None: - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = name - self.tier = tier - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_paged_models.py deleted file mode 100644 index 77509d66a18..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/__init__.py deleted file mode 100644 index d1b67f7888b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._managed_clusters_operations import ManagedClustersOperations -from ._agent_pools_operations import AgentPoolsOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', - 'AgentPoolsOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/_managed_clusters_operations.py deleted file mode 100644 index f54fbca2f5d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1134 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-03-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_03_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/_operations.py deleted file mode 100644 index a3f40bf04b0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-03-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2020_03_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/version.py deleted file mode 100644 index 500c4bb0269..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2020-03-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/_container_service_client.py deleted file mode 100644 index 152f8b782cd..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/_container_service_client.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import AgentPoolsOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2020_04_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2020_04_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2020_04_01.operations.AgentPoolsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-04-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/__init__.py deleted file mode 100644 index f8c324d8029..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/__init__.py +++ /dev/null @@ -1,180 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import AgentPoolUpgradeSettings - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAddonProfileIdentity - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterSKU - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import SubResource - from ._models_py3 import TagsObject - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import AgentPoolUpgradeSettings - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterSKU - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import TagsObject - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, - AgentPoolMode, - ScaleSetPriority, - ScaleSetEvictionPolicy, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, - LoadBalancerSku, - ResourceIdentityType, - ManagedClusterSKUName, - ManagedClusterSKUTier, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'AgentPoolUpgradeSettings', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAddonProfileIdentity', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterIdentity', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterSKU', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'Resource', - 'ResourceReference', - 'SubResource', - 'TagsObject', - 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', - 'AgentPoolMode', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', - 'LoadBalancerSku', - 'ResourceIdentityType', - 'ManagedClusterSKUName', - 'ManagedClusterSKUTier', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_container_service_client_enums.py deleted file mode 100644 index 2dc7cc068f9..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,273 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class AgentPoolMode(str, Enum): - - system = "System" - user = "User" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - none = "None" - - -class ManagedClusterSKUName(str, Enum): - - basic = "Basic" - - -class ManagedClusterSKUTier(str, Enum): - - paid = "Paid" - free = "Free" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_models.py deleted file mode 100644 index 27fe82d1858..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_models.py +++ /dev/null @@ -1,2099 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = kwargs.get('node_image_version', None) - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - self.latest_node_image_version = kwargs.get('latest_node_image_version', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = kwargs.get('max_surge', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_04_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_04_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_04_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_04_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_04_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_04_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.network_mode = kwargs.get('network_mode', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.outbound_type = kwargs.get('outbound_type', "loadBalancer") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_04_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) - self.identity_profile = kwargs.get('identity_profile', None) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = kwargs.get('managed', None) - self.admin_group_object_ids = kwargs.get('admin_group_object_ids', None) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = kwargs.get('node_image_version', None) - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_04_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_04_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_04_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) - self.scan_interval = kwargs.get('scan_interval', None) - self.scale_down_delay_after_add = kwargs.get('scale_down_delay_after_add', None) - self.scale_down_delay_after_delete = kwargs.get('scale_down_delay_after_delete', None) - self.scale_down_delay_after_failure = kwargs.get('scale_down_delay_after_failure', None) - self.scale_down_unneeded_time = kwargs.get('scale_down_unneeded_time', None) - self.scale_down_unready_time = kwargs.get('scale_down_unready_time', None) - self.scale_down_utilization_threshold = kwargs.get('scale_down_utilization_threshold', None) - self.max_graceful_termination_sec = kwargs.get('max_graceful_termination_sec', None) - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_models_py3.py deleted file mode 100644 index f9cd56462cc..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_models_py3.py +++ /dev/null @@ -1,2099 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, mode=None, orchestrator_version: str=None, node_image_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = node_image_version - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, latest_node_image_version: str=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - self.latest_node_image_version = latest_node_image_version - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, *, max_surge: str=None, **kwargs) -> None: - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = max_surge - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_04_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_04_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_04_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_04_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_04_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_04_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.network_mode = network_mode - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.outbound_type = outbound_type - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_04_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, identity=None, sku=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.auto_scaler_profile = auto_scaler_profile - self.api_server_access_profile = api_server_access_profile - self.disk_encryption_set_id = disk_encryption_set_id - self.identity_profile = identity_profile - self.identity = identity - self.sku = sku - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, managed: bool=None, admin_group_object_ids=None, client_app_id: str=None, server_app_id: str=None, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = managed - self.admin_group_object_ids = admin_group_object_ids - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - } - - def __init__(self, *, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, node_image_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = node_image_version - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. Number of agents (VMs) to host docker containers. - Allowed values must be in the range of 0 to 100 (inclusive). The default - value is 1. . Default value: 1 . - :type count: int - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'count': {'required': True, 'maximum': 100, 'minimum': 0}, - 'vm_size': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, vm_size, name: str, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, node_image_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, node_image_version=node_image_version, upgrade_settings=upgrade_settings, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_04_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - self.allocated_outbound_ports = allocated_outbound_ports - self.idle_timeout_in_minutes = idle_timeout_in_minutes - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_04_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_04_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_04_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - } - - def __init__(self, *, balance_similar_node_groups: str=None, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, max_graceful_termination_sec: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = balance_similar_node_groups - self.scan_interval = scan_interval - self.scale_down_delay_after_add = scale_down_delay_after_add - self.scale_down_delay_after_delete = scale_down_delay_after_delete - self.scale_down_delay_after_failure = scale_down_delay_after_failure - self.scale_down_unneeded_time = scale_down_unneeded_time - self.scale_down_unready_time = scale_down_unready_time - self.scale_down_utilization_threshold = scale_down_utilization_threshold - self.max_graceful_termination_sec = max_graceful_termination_sec - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, tier=None, **kwargs) -> None: - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = name - self.tier = tier - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_paged_models.py deleted file mode 100644 index a32e4c22c1b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/__init__.py deleted file mode 100644 index d1b67f7888b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._managed_clusters_operations import ManagedClustersOperations -from ._agent_pools_operations import AgentPoolsOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', - 'AgentPoolsOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/_agent_pools_operations.py deleted file mode 100644 index cac05714e4d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,511 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-04-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2020_04_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_04_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_04_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_04_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/_managed_clusters_operations.py deleted file mode 100644 index 8426985728b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-04-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. **WARNING**: This API - will be deprecated. Instead use - [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) - or - [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) - . - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_04_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2020_04_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/_operations.py deleted file mode 100644 index 9e91e7c0321..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-04-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2020_04_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2020_04_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/version.py deleted file mode 100644 index b4a222521b4..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_04_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2020-04-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/_container_service_client.py deleted file mode 100644 index b98faa63f24..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/_container_service_client.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import AgentPoolsOperations -from .operations import PrivateEndpointConnectionsOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2020_06_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2020_06_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2020_06_01.operations.AgentPoolsOperations - :ivar private_endpoint_connections: PrivateEndpointConnections operations - :vartype private_endpoint_connections: azure.mgmt.containerservice.v2020_06_01.operations.PrivateEndpointConnectionsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-06-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/__init__.py deleted file mode 100644 index 37dc5be9275..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/__init__.py +++ /dev/null @@ -1,199 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import AgentPoolUpgradeSettings - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAddonProfileIdentity - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterSKU - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import PrivateEndpoint - from ._models_py3 import PrivateEndpointConnection - from ._models_py3 import PrivateEndpointConnectionListResult - from ._models_py3 import PrivateLinkServiceConnectionState - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import SubResource - from ._models_py3 import TagsObject - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import AgentPoolUpgradeSettings - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterSKU - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import PrivateEndpoint - from ._models import PrivateEndpointConnection - from ._models import PrivateEndpointConnectionListResult - from ._models import PrivateLinkServiceConnectionState - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import TagsObject - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSType, - AgentPoolType, - AgentPoolMode, - ScaleSetPriority, - ScaleSetEvictionPolicy, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, - LoadBalancerSku, - ResourceIdentityType, - ManagedClusterSKUName, - ManagedClusterSKUTier, - PrivateEndpointConnectionProvisioningState, - ConnectionStatus, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'AgentPoolUpgradeSettings', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAddonProfileIdentity', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterIdentity', - 'ManagedClusterIdentityUserAssignedIdentitiesValue', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterSKU', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'PrivateEndpoint', - 'PrivateEndpointConnection', - 'PrivateEndpointConnectionListResult', - 'PrivateLinkServiceConnectionState', - 'Resource', - 'ResourceReference', - 'SubResource', - 'TagsObject', - 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSType', - 'AgentPoolType', - 'AgentPoolMode', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', - 'LoadBalancerSku', - 'ResourceIdentityType', - 'ManagedClusterSKUName', - 'ManagedClusterSKUTier', - 'PrivateEndpointConnectionProvisioningState', - 'ConnectionStatus', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_container_service_client_enums.py deleted file mode 100644 index 6dcc936f3a4..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,290 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class AgentPoolMode(str, Enum): - - system = "System" - user = "User" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - none = "None" - - -class ManagedClusterSKUName(str, Enum): - - basic = "Basic" - - -class ManagedClusterSKUTier(str, Enum): - - paid = "Paid" - free = "Free" - - -class PrivateEndpointConnectionProvisioningState(str, Enum): - - succeeded = "Succeeded" - creating = "Creating" - deleting = "Deleting" - failed = "Failed" - - -class ConnectionStatus(str, Enum): - - pending = "Pending" - approved = "Approved" - rejected = "Rejected" - disconnected = "Disconnected" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_models.py deleted file mode 100644 index 2610b0b3afa..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_models.py +++ /dev/null @@ -1,2255 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = kwargs.get('node_image_version', None) - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - self.latest_node_image_version = kwargs.get('latest_node_image_version', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = kwargs.get('max_surge', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_06_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_06_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_06_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_06_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_06_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_06_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.network_mode = kwargs.get('network_mode', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.outbound_type = kwargs.get('outbound_type', "loadBalancer") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_06_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) - self.identity_profile = kwargs.get('identity_profile', None) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = kwargs.get('managed', None) - self.enable_azure_rbac = kwargs.get('enable_azure_rbac', None) - self.admin_group_object_ids = kwargs.get('admin_group_object_ids', None) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = kwargs.get('node_image_version', None) - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_06_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_06_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_06_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) - self.scan_interval = kwargs.get('scan_interval', None) - self.scale_down_delay_after_add = kwargs.get('scale_down_delay_after_add', None) - self.scale_down_delay_after_delete = kwargs.get('scale_down_delay_after_delete', None) - self.scale_down_delay_after_failure = kwargs.get('scale_down_delay_after_failure', None) - self.scale_down_unneeded_time = kwargs.get('scale_down_unneeded_time', None) - self.scale_down_unready_time = kwargs.get('scale_down_unready_time', None) - self.scale_down_utilization_threshold = kwargs.get('scale_down_utilization_threshold', None) - self.max_graceful_termination_sec = kwargs.get('max_graceful_termination_sec', None) - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_models_py3.py deleted file mode 100644 index 369cc817309..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_models_py3.py +++ /dev/null @@ -1,2255 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - } - - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, mode=None, orchestrator_version: str=None, node_image_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = node_image_version - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, latest_node_image_version: str=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - self.latest_node_image_version = latest_node_image_version - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, *, max_surge: str=None, **kwargs) -> None: - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = max_surge - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_06_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_06_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_06_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_06_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_06_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_06_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.network_mode = network_mode - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.outbound_type = outbound_type - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_06_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (PREVIEW) Whether to enable Kubernetes - Pod security policy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, identity=None, sku=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.auto_scaler_profile = auto_scaler_profile - self.api_server_access_profile = api_server_access_profile - self.disk_encryption_set_id = disk_encryption_set_id - self.identity_profile = identity_profile - self.identity = identity - self.sku = sku - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, managed: bool=None, enable_azure_rbac: bool=None, admin_group_object_ids=None, client_app_id: str=None, server_app_id: str=None, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = managed - self.enable_azure_rbac = enable_azure_rbac - self.admin_group_object_ids = admin_group_object_ids - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - } - - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, node_image_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = node_image_version - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :param node_image_version: Version of node image - :type node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str, count: int=None, vm_size=None, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, node_image_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, node_image_version=node_image_version, upgrade_settings=upgrade_settings, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, proximity_placement_group_id=proximity_placement_group_id, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.user_assigned_identities = user_assigned_identities - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_06_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - self.allocated_outbound_ports = allocated_outbound_ports - self.idle_timeout_in_minutes = idle_timeout_in_minutes - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_06_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_06_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_06_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - } - - def __init__(self, *, balance_similar_node_groups: str=None, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, max_graceful_termination_sec: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = balance_similar_node_groups - self.scan_interval = scan_interval - self.scale_down_delay_after_add = scale_down_delay_after_add - self.scale_down_delay_after_delete = scale_down_delay_after_delete - self.scale_down_delay_after_failure = scale_down_delay_after_failure - self.scale_down_unneeded_time = scale_down_unneeded_time - self.scale_down_unready_time = scale_down_unready_time - self.scale_down_utilization_threshold = scale_down_utilization_threshold - self.max_graceful_termination_sec = max_graceful_termination_sec - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, tier=None, **kwargs) -> None: - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = name - self.tier = tier - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = id - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, *, private_link_service_connection_state, private_endpoint=None, **kwargs) -> None: - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = value - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2020_06_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, status=None, description: str=None, **kwargs) -> None: - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = status - self.description = description - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_paged_models.py deleted file mode 100644 index 18a9e892f3e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/__init__.py deleted file mode 100644 index 1e7fcfbd1f0..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._managed_clusters_operations import ManagedClustersOperations -from ._agent_pools_operations import AgentPoolsOperations -from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', - 'AgentPoolsOperations', - 'PrivateEndpointConnectionsOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_agent_pools_operations.py deleted file mode 100644 index 0f39c0800df..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,511 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2020_06_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_06_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_06_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_06_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_managed_clusters_operations.py deleted file mode 100644 index 05f377e85a6..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1139 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. **WARNING**: This API - will be deprecated. Instead use - [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) - or - [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) - . - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_06_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2020_06_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_operations.py deleted file mode 100644 index 8cf6be2277e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2020_06_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_private_endpoint_connections_operations.py deleted file mode 100644 index 51b9fe38f32..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/operations/_private_endpoint_connections_operations.py +++ /dev/null @@ -1,348 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class PrivateEndpointConnectionsOperations(object): - """PrivateEndpointConnectionsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-06-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private endpoint connections in the specified managed - cluster. - - Gets a list of private endpoint connections in the specified managed - cluster. The operation returns properties of each private endpoint - connection. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnectionListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpointConnectionListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} - - def get( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """Gets the private endpoint connection. - - Gets the details of the private endpoint connection by managed cluster - and resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def update( - self, resource_group_name, resource_name, private_endpoint_connection_name, private_link_service_connection_state, private_endpoint=None, custom_headers=None, raw=False, **operation_config): - """Updates a private endpoint connection. - - Updates a private endpoint connection in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param private_link_service_connection_state: A collection of - information about the state of the connection between service consumer - and provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateLinkServiceConnectionState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpoint - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_06_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a private endpoint connection. - - Deletes the private endpoint connection in the specified managed - cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/version.py deleted file mode 100644 index 589be3af5bb..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_06_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2020-06-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/_container_service_client.py deleted file mode 100644 index 9edc6189016..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/_container_service_client.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import AgentPoolsOperations -from .operations import PrivateEndpointConnectionsOperations -from .operations import PrivateLinkResourcesOperations -from .operations import ResolvePrivateLinkServiceIdOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2020_09_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2020_09_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2020_09_01.operations.AgentPoolsOperations - :ivar private_endpoint_connections: PrivateEndpointConnections operations - :vartype private_endpoint_connections: azure.mgmt.containerservice.v2020_09_01.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResources operations - :vartype private_link_resources: azure.mgmt.containerservice.v2020_09_01.operations.PrivateLinkResourcesOperations - :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceId operations - :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2020_09_01.operations.ResolvePrivateLinkServiceIdOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-09-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/__init__.py deleted file mode 100644 index e6f8e63bc67..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/__init__.py +++ /dev/null @@ -1,216 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import AgentPoolUpgradeSettings - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAddonProfileIdentity - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterSKU - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import PowerState - from ._models_py3 import PrivateEndpoint - from ._models_py3 import PrivateEndpointConnection - from ._models_py3 import PrivateEndpointConnectionListResult - from ._models_py3 import PrivateLinkResource - from ._models_py3 import PrivateLinkResourcesListResult - from ._models_py3 import PrivateLinkServiceConnectionState - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import SubResource - from ._models_py3 import TagsObject - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import AgentPoolUpgradeSettings - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterSKU - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import PowerState - from ._models import PrivateEndpoint - from ._models import PrivateEndpointConnection - from ._models import PrivateEndpointConnectionListResult - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourcesListResult - from ._models import PrivateLinkServiceConnectionState - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import TagsObject - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSDiskType, - OSType, - AgentPoolType, - AgentPoolMode, - Code, - ScaleSetPriority, - ScaleSetEvictionPolicy, - LicenseType, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, - LoadBalancerSku, - Expander, - ResourceIdentityType, - ManagedClusterSKUName, - ManagedClusterSKUTier, - PrivateEndpointConnectionProvisioningState, - ConnectionStatus, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'AgentPoolUpgradeSettings', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAddonProfileIdentity', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterIdentity', - 'ManagedClusterIdentityUserAssignedIdentitiesValue', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterSKU', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'PowerState', - 'PrivateEndpoint', - 'PrivateEndpointConnection', - 'PrivateEndpointConnectionListResult', - 'PrivateLinkResource', - 'PrivateLinkResourcesListResult', - 'PrivateLinkServiceConnectionState', - 'Resource', - 'ResourceReference', - 'SubResource', - 'TagsObject', - 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSDiskType', - 'OSType', - 'AgentPoolType', - 'AgentPoolMode', - 'Code', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'LicenseType', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', - 'LoadBalancerSku', - 'Expander', - 'ResourceIdentityType', - 'ManagedClusterSKUName', - 'ManagedClusterSKUTier', - 'PrivateEndpointConnectionProvisioningState', - 'ConnectionStatus', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_container_service_client_enums.py deleted file mode 100644 index 05f02c62b83..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,315 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSDiskType(str, Enum): - - managed = "Managed" - ephemeral = "Ephemeral" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class AgentPoolMode(str, Enum): - - system = "System" - user = "User" - - -class Code(str, Enum): - - running = "Running" - stopped = "Stopped" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class LicenseType(str, Enum): - - none = "None" - windows_server = "Windows_Server" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class Expander(str, Enum): - - least_waste = "least-waste" - most_pods = "most-pods" - random = "random" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - none = "None" - - -class ManagedClusterSKUName(str, Enum): - - basic = "Basic" - - -class ManagedClusterSKUTier(str, Enum): - - paid = "Paid" - free = "Free" - - -class PrivateEndpointConnectionProvisioningState(str, Enum): - - succeeded = "Succeeded" - creating = "Creating" - deleting = "Deleting" - failed = "Failed" - - -class ConnectionStatus(str, Enum): - - pending = "Pending" - approved = "Approved" - rejected = "Rejected" - disconnected = "Disconnected" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_models.py deleted file mode 100644 index b72f9fef3ac..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_models.py +++ /dev/null @@ -1,2420 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.os_disk_type = kwargs.get('os_disk_type', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = None - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.power_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - self.latest_node_image_version = kwargs.get('latest_node_image_version', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = kwargs.get('max_surge', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_09_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_09_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_09_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_09_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_09_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_09_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.network_mode = kwargs.get('network_mode', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.outbound_type = kwargs.get('outbound_type', "loadBalancer") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_09_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) - self.identity_profile = kwargs.get('identity_profile', None) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = kwargs.get('managed', None) - self.enable_azure_rbac = kwargs.get('enable_azure_rbac', None) - self.admin_group_object_ids = kwargs.get('admin_group_object_ids', None) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.os_disk_type = kwargs.get('os_disk_type', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = None - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.power_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_09_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_09_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_09_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2020_09_01.models.Expander - :param max_empty_bulk_delete: - :type max_empty_bulk_delete: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - :param max_total_unready_percentage: - :type max_total_unready_percentage: str - :param new_pod_scale_up_delay: - :type new_pod_scale_up_delay: str - :param ok_total_unready_count: - :type ok_total_unready_count: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param skip_nodes_with_local_storage: - :type skip_nodes_with_local_storage: str - :param skip_nodes_with_system_pods: - :type skip_nodes_with_system_pods: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'expander': {'key': 'expander', 'type': 'str'}, - 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, - 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, - 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, - 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) - self.expander = kwargs.get('expander', None) - self.max_empty_bulk_delete = kwargs.get('max_empty_bulk_delete', None) - self.max_graceful_termination_sec = kwargs.get('max_graceful_termination_sec', None) - self.max_total_unready_percentage = kwargs.get('max_total_unready_percentage', None) - self.new_pod_scale_up_delay = kwargs.get('new_pod_scale_up_delay', None) - self.ok_total_unready_count = kwargs.get('ok_total_unready_count', None) - self.scan_interval = kwargs.get('scan_interval', None) - self.scale_down_delay_after_add = kwargs.get('scale_down_delay_after_add', None) - self.scale_down_delay_after_delete = kwargs.get('scale_down_delay_after_delete', None) - self.scale_down_delay_after_failure = kwargs.get('scale_down_delay_after_failure', None) - self.scale_down_unneeded_time = kwargs.get('scale_down_unneeded_time', None) - self.scale_down_unready_time = kwargs.get('scale_down_unready_time', None) - self.scale_down_utilization_threshold = kwargs.get('scale_down_utilization_threshold', None) - self.skip_nodes_with_local_storage = kwargs.get('skip_nodes_with_local_storage', None) - self.skip_nodes_with_system_pods = kwargs.get('skip_nodes_with_system_pods', None) - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.LicenseType - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.license_type = kwargs.get('license_type', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class PowerState(Model): - """Describes the Power State of the cluster. - - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' - :type code: str or ~azure.mgmt.containerservice.v2020_09_01.models.Code - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PowerState, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkResource(Model): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The ID of the private link resource. - :type id: str - :param name: The name of the private link resource. - :type name: str - :param type: The resource type. - :type type: str - :param group_id: The group ID of the resource. - :type group_id: str - :param required_members: RequiredMembers of the resource - :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. - :vartype private_link_service_id: str - """ - - _validation = { - 'private_link_service_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.group_id = kwargs.get('group_id', None) - self.required_members = kwargs.get('required_members', None) - self.private_link_service_id = None - - -class PrivateLinkResourcesListResult(Model): - """A list of private link resources. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResourcesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_models_py3.py deleted file mode 100644 index 1d9e43d5bec..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_models_py3.py +++ /dev/null @@ -1,2420 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - } - - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = None - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.power_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, latest_node_image_version: str=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - self.latest_node_image_version = latest_node_image_version - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, *, max_surge: str=None, **kwargs) -> None: - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = max_surge - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_09_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_09_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_09_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_09_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_09_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_09_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.network_mode = network_mode - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.outbound_type = outbound_type - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_09_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAddonProfile] - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAADProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, identity=None, sku=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.auto_scaler_profile = auto_scaler_profile - self.api_server_access_profile = api_server_access_profile - self.disk_encryption_set_id = disk_encryption_set_id - self.identity_profile = identity_profile - self.identity = identity - self.sku = sku - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, managed: bool=None, enable_azure_rbac: bool=None, admin_group_object_ids=None, client_app_id: str=None, server_app_id: str=None, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = managed - self.enable_azure_rbac = enable_azure_rbac - self.admin_group_object_ids = admin_group_object_ids - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - } - - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type - self.vnet_subnet_id = vnet_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = None - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.power_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, os_disk_type=os_disk_type, vnet_subnet_id=vnet_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, upgrade_settings=upgrade_settings, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, proximity_placement_group_id=proximity_placement_group_id, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.user_assigned_identities = user_assigned_identities - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_09_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - self.allocated_outbound_ports = allocated_outbound_ports - self.idle_timeout_in_minutes = idle_timeout_in_minutes - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_09_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_09_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2020_09_01.models.Expander - :param max_empty_bulk_delete: - :type max_empty_bulk_delete: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - :param max_total_unready_percentage: - :type max_total_unready_percentage: str - :param new_pod_scale_up_delay: - :type new_pod_scale_up_delay: str - :param ok_total_unready_count: - :type ok_total_unready_count: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param skip_nodes_with_local_storage: - :type skip_nodes_with_local_storage: str - :param skip_nodes_with_system_pods: - :type skip_nodes_with_system_pods: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'expander': {'key': 'expander', 'type': 'str'}, - 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, - 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, - 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, - 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, - } - - def __init__(self, *, balance_similar_node_groups: str=None, expander=None, max_empty_bulk_delete: str=None, max_graceful_termination_sec: str=None, max_total_unready_percentage: str=None, new_pod_scale_up_delay: str=None, ok_total_unready_count: str=None, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, skip_nodes_with_local_storage: str=None, skip_nodes_with_system_pods: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = balance_similar_node_groups - self.expander = expander - self.max_empty_bulk_delete = max_empty_bulk_delete - self.max_graceful_termination_sec = max_graceful_termination_sec - self.max_total_unready_percentage = max_total_unready_percentage - self.new_pod_scale_up_delay = new_pod_scale_up_delay - self.ok_total_unready_count = ok_total_unready_count - self.scan_interval = scan_interval - self.scale_down_delay_after_add = scale_down_delay_after_add - self.scale_down_delay_after_delete = scale_down_delay_after_delete - self.scale_down_delay_after_failure = scale_down_delay_after_failure - self.scale_down_unneeded_time = scale_down_unneeded_time - self.scale_down_unready_time = scale_down_unready_time - self.scale_down_utilization_threshold = scale_down_utilization_threshold - self.skip_nodes_with_local_storage = skip_nodes_with_local_storage - self.skip_nodes_with_system_pods = skip_nodes_with_system_pods - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, tier=None, **kwargs) -> None: - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = name - self.tier = tier - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Windows VMs. - :type admin_username: str - :param admin_password: The administrator password to use for Windows VMs. - :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2020_09_01.models.LicenseType - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, license_type=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - self.license_type = license_type - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class PowerState(Model): - """Describes the Power State of the cluster. - - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' - :type code: str or ~azure.mgmt.containerservice.v2020_09_01.models.Code - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, *, code=None, **kwargs) -> None: - super(PowerState, self).__init__(**kwargs) - self.code = code - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = id - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, *, private_link_service_connection_state, private_endpoint=None, **kwargs) -> None: - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = value - - -class PrivateLinkResource(Model): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The ID of the private link resource. - :type id: str - :param name: The name of the private link resource. - :type name: str - :param type: The resource type. - :type type: str - :param group_id: The group ID of the resource. - :type group_id: str - :param required_members: RequiredMembers of the resource - :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. - :vartype private_link_service_id: str - """ - - _validation = { - 'private_link_service_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, type: str=None, group_id: str=None, required_members=None, **kwargs) -> None: - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = id - self.name = name - self.type = type - self.group_id = group_id - self.required_members = required_members - self.private_link_service_id = None - - -class PrivateLinkResourcesListResult(Model): - """A list of private link resources. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PrivateLinkResourcesListResult, self).__init__(**kwargs) - self.value = value - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2020_09_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, status=None, description: str=None, **kwargs) -> None: - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = status - self.description = description - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_paged_models.py deleted file mode 100644 index 9bd6710b865..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/__init__.py deleted file mode 100644 index fecbc32dd78..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._managed_clusters_operations import ManagedClustersOperations -from ._agent_pools_operations import AgentPoolsOperations -from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations -from ._private_link_resources_operations import PrivateLinkResourcesOperations -from ._resolve_private_link_service_id_operations import ResolvePrivateLinkServiceIdOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', - 'AgentPoolsOperations', - 'PrivateEndpointConnectionsOperations', - 'PrivateLinkResourcesOperations', - 'ResolvePrivateLinkServiceIdOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_agent_pools_operations.py deleted file mode 100644 index eeefe4cf734..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,511 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2020_09_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_09_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_09_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_09_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_managed_clusters_operations.py deleted file mode 100644 index e32eeafdef3..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1400 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. **WARNING**: This API - will be deprecated. Instead use - [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) - or - [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) - . - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_09_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2020_09_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} - - - def _stop_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def stop( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Stop Managed Cluster. - - Stops a Running Managed Cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} - - - def _start_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Start Managed Cluster. - - Starts a Stopped Managed Cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} - - - def _upgrade_node_image_version_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.upgrade_node_image_version.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 202: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def upgrade_node_image_version( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrade node image version of an agent pool to the latest. - - Upgrade node image version of an agent pool to the latest. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_09_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_09_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._upgrade_node_image_version_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_operations.py deleted file mode 100644 index 4598ca46e67..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2020_09_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_private_endpoint_connections_operations.py deleted file mode 100644 index 99a30128655..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_private_endpoint_connections_operations.py +++ /dev/null @@ -1,348 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class PrivateEndpointConnectionsOperations(object): - """PrivateEndpointConnectionsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private endpoint connections in the specified managed - cluster. - - Gets a list of private endpoint connections in the specified managed - cluster. The operation returns properties of each private endpoint - connection. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnectionListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpointConnectionListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} - - def get( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """Gets the private endpoint connection. - - Gets the details of the private endpoint connection by managed cluster - and resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def update( - self, resource_group_name, resource_name, private_endpoint_connection_name, private_link_service_connection_state, private_endpoint=None, custom_headers=None, raw=False, **operation_config): - """Updates a private endpoint connection. - - Updates a private endpoint connection in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param private_link_service_connection_state: A collection of - information about the state of the connection between service consumer - and provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkServiceConnectionState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpoint - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a private endpoint connection. - - Deletes the private endpoint connection in the specified managed - cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_resolve_private_link_service_id_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_resolve_private_link_service_id_operations.py deleted file mode 100644 index 90baa4322be..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_resolve_private_link_service_id_operations.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ResolvePrivateLinkServiceIdOperations(object): - """ResolvePrivateLinkServiceIdOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-09-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-09-01" - - self.config = config - - def post( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - """Gets the private link service ID for the specified managed cluster. - - Gets the private link service ID the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters (name, groupId) supplied in order to - resolve a private link service ID. - :type parameters: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.post.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateLinkResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/version.py deleted file mode 100644 index 16563e7d14c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2020-09-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/_container_service_client.py deleted file mode 100644 index c795449f4ea..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/_container_service_client.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import AgentPoolsOperations -from .operations import PrivateEndpointConnectionsOperations -from .operations import PrivateLinkResourcesOperations -from .operations import ResolvePrivateLinkServiceIdOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2020_11_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2020_11_01.operations.ManagedClustersOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2020_11_01.operations.AgentPoolsOperations - :ivar private_endpoint_connections: PrivateEndpointConnections operations - :vartype private_endpoint_connections: azure.mgmt.containerservice.v2020_11_01.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResources operations - :vartype private_link_resources: azure.mgmt.containerservice.v2020_11_01.operations.PrivateLinkResourcesOperations - :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceId operations - :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2020_11_01.operations.ResolvePrivateLinkServiceIdOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-11-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/__init__.py deleted file mode 100644 index babb4e3ed61..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/__init__.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import AgentPoolUpgradeSettings - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import KubeletConfig - from ._models_py3 import LinuxOSConfig - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAddonProfileIdentity - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterAutoUpgradeProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPodIdentity - from ._models_py3 import ManagedClusterPodIdentityException - from ._models_py3 import ManagedClusterPodIdentityProfile - from ._models_py3 import ManagedClusterPodIdentityProvisioningInfo - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterSKU - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import PowerState - from ._models_py3 import PrivateEndpoint - from ._models_py3 import PrivateEndpointConnection - from ._models_py3 import PrivateEndpointConnectionListResult - from ._models_py3 import PrivateLinkResource - from ._models_py3 import PrivateLinkResourcesListResult - from ._models_py3 import PrivateLinkServiceConnectionState - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import SubResource - from ._models_py3 import SysctlConfig - from ._models_py3 import TagsObject - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import AgentPoolUpgradeSettings - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import KubeletConfig - from ._models import LinuxOSConfig - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterAutoUpgradeProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPodIdentity - from ._models import ManagedClusterPodIdentityException - from ._models import ManagedClusterPodIdentityProfile - from ._models import ManagedClusterPodIdentityProvisioningInfo - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterSKU - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import PowerState - from ._models import PrivateEndpoint - from ._models import PrivateEndpointConnection - from ._models import PrivateEndpointConnectionListResult - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourcesListResult - from ._models import PrivateLinkServiceConnectionState - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import SysctlConfig - from ._models import TagsObject - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSDiskType, - OSType, - AgentPoolType, - AgentPoolMode, - Code, - ScaleSetPriority, - ScaleSetEvictionPolicy, - LicenseType, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, - LoadBalancerSku, - ManagedClusterPodIdentityProvisioningState, - UpgradeChannel, - Expander, - ResourceIdentityType, - ManagedClusterSKUName, - ManagedClusterSKUTier, - PrivateEndpointConnectionProvisioningState, - ConnectionStatus, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'AgentPoolUpgradeSettings', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'KubeletConfig', - 'LinuxOSConfig', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAddonProfileIdentity', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterAutoUpgradeProfile', - 'ManagedClusterIdentity', - 'ManagedClusterIdentityUserAssignedIdentitiesValue', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPodIdentity', - 'ManagedClusterPodIdentityException', - 'ManagedClusterPodIdentityProfile', - 'ManagedClusterPodIdentityProvisioningInfo', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterSKU', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'PowerState', - 'PrivateEndpoint', - 'PrivateEndpointConnection', - 'PrivateEndpointConnectionListResult', - 'PrivateLinkResource', - 'PrivateLinkResourcesListResult', - 'PrivateLinkServiceConnectionState', - 'Resource', - 'ResourceReference', - 'SubResource', - 'SysctlConfig', - 'TagsObject', - 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSDiskType', - 'OSType', - 'AgentPoolType', - 'AgentPoolMode', - 'Code', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'LicenseType', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', - 'LoadBalancerSku', - 'ManagedClusterPodIdentityProvisioningState', - 'UpgradeChannel', - 'Expander', - 'ResourceIdentityType', - 'ManagedClusterSKUName', - 'ManagedClusterSKUTier', - 'PrivateEndpointConnectionProvisioningState', - 'ConnectionStatus', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_container_service_client_enums.py deleted file mode 100644 index 346a84f3900..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,331 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSDiskType(str, Enum): - - managed = "Managed" - ephemeral = "Ephemeral" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class AgentPoolMode(str, Enum): - - system = "System" - user = "User" - - -class Code(str, Enum): - - running = "Running" - stopped = "Stopped" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class LicenseType(str, Enum): - - none = "None" - windows_server = "Windows_Server" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class ManagedClusterPodIdentityProvisioningState(str, Enum): - - assigned = "Assigned" - updating = "Updating" - deleting = "Deleting" - failed = "Failed" - - -class UpgradeChannel(str, Enum): - - rapid = "rapid" - stable = "stable" - patch = "patch" - none = "none" - - -class Expander(str, Enum): - - least_waste = "least-waste" - most_pods = "most-pods" - random = "random" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - none = "None" - - -class ManagedClusterSKUName(str, Enum): - - basic = "Basic" - - -class ManagedClusterSKUTier(str, Enum): - - paid = "Paid" - free = "Free" - - -class PrivateEndpointConnectionProvisioningState(str, Enum): - - succeeded = "Succeeded" - creating = "Creating" - deleting = "Deleting" - failed = "Failed" - - -class ConnectionStatus(str, Enum): - - pending = "Pending" - approved = "Approved" - rejected = "Rejected" - disconnected = "Disconnected" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_models.py deleted file mode 100644 index d55b788faae..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_models.py +++ /dev/null @@ -1,2856 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_11_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_11_01.models.LinuxOSConfig - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'properties.podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'properties.kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'properties.linuxOSConfig', 'type': 'LinuxOSConfig'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.os_disk_type = kwargs.get('os_disk_type', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.pod_subnet_id = kwargs.get('pod_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = None - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.power_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - self.kubelet_config = kwargs.get('kubelet_config', None) - self.linux_os_config = kwargs.get('linux_os_config', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - self.latest_node_image_version = kwargs.get('latest_node_image_version', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = kwargs.get('max_surge', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_11_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_11_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_11_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_11_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_11_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_11_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.network_mode = kwargs.get('network_mode', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.outbound_type = kwargs.get('outbound_type', "loadBalancer") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_11_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class KubeletConfig(Model): - """Kubelet configurations of agent nodes. - - :param cpu_manager_policy: CPU Manager policy to use. - :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. - :type cpu_cfs_quota: bool - :param cpu_cfs_quota_period: Sets CPU CFS quota period value. - :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. - :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. - :type image_gc_low_threshold: int - :param topology_manager_policy: Topology Manager policy to use. - :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). - :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. - :type fail_swap_on: bool - """ - - _attribute_map = { - 'cpu_manager_policy': {'key': 'cpuManagerPolicy', 'type': 'str'}, - 'cpu_cfs_quota': {'key': 'cpuCfsQuota', 'type': 'bool'}, - 'cpu_cfs_quota_period': {'key': 'cpuCfsQuotaPeriod', 'type': 'str'}, - 'image_gc_high_threshold': {'key': 'imageGcHighThreshold', 'type': 'int'}, - 'image_gc_low_threshold': {'key': 'imageGcLowThreshold', 'type': 'int'}, - 'topology_manager_policy': {'key': 'topologyManagerPolicy', 'type': 'str'}, - 'allowed_unsafe_sysctls': {'key': 'allowedUnsafeSysctls', 'type': '[str]'}, - 'fail_swap_on': {'key': 'failSwapOn', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(KubeletConfig, self).__init__(**kwargs) - self.cpu_manager_policy = kwargs.get('cpu_manager_policy', None) - self.cpu_cfs_quota = kwargs.get('cpu_cfs_quota', None) - self.cpu_cfs_quota_period = kwargs.get('cpu_cfs_quota_period', None) - self.image_gc_high_threshold = kwargs.get('image_gc_high_threshold', None) - self.image_gc_low_threshold = kwargs.get('image_gc_low_threshold', None) - self.topology_manager_policy = kwargs.get('topology_manager_policy', None) - self.allowed_unsafe_sysctls = kwargs.get('allowed_unsafe_sysctls', None) - self.fail_swap_on = kwargs.get('fail_swap_on', None) - - -class LinuxOSConfig(Model): - """OS configurations of Linux agent nodes. - - :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2020_11_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. - :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. - :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. - :type swap_file_size_mb: int - """ - - _attribute_map = { - 'sysctls': {'key': 'sysctls', 'type': 'SysctlConfig'}, - 'transparent_huge_page_enabled': {'key': 'transparentHugePageEnabled', 'type': 'str'}, - 'transparent_huge_page_defrag': {'key': 'transparentHugePageDefrag', 'type': 'str'}, - 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(LinuxOSConfig, self).__init__(**kwargs) - self.sysctls = kwargs.get('sysctls', None) - self.transparent_huge_page_enabled = kwargs.get('transparent_huge_page_enabled', None) - self.transparent_huge_page_defrag = kwargs.get('transparent_huge_page_defrag', None) - self.swap_file_size_mb = kwargs.get('swap_file_size_mb', None) - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAddonProfile] - :param pod_identity_profile: Profile of managed cluster pod identity. - :type pod_identity_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAADProfile - :param auto_upgrade_profile: Profile of auto upgrade configuration. - :type auto_upgrade_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.pod_identity_profile = kwargs.get('pod_identity_profile', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.auto_upgrade_profile = kwargs.get('auto_upgrade_profile', None) - self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) - self.identity_profile = kwargs.get('identity_profile', None) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = kwargs.get('managed', None) - self.enable_azure_rbac = kwargs.get('enable_azure_rbac', None) - self.admin_group_object_ids = kwargs.get('admin_group_object_ids', None) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_11_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_11_01.models.LinuxOSConfig - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.os_disk_type = kwargs.get('os_disk_type', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.pod_subnet_id = kwargs.get('pod_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = None - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.power_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - self.kubelet_config = kwargs.get('kubelet_config', None) - self.linux_os_config = kwargs.get('linux_os_config', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_11_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_11_01.models.LinuxOSConfig - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - :param private_dns_zone: Private dns zone mode for private cluster. - :type private_dns_zone: str - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - self.private_dns_zone = kwargs.get('private_dns_zone', None) - - -class ManagedClusterAutoUpgradeProfile(Model): - """Auto upgrade profile for a managed cluster. - - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2020_11_01.models.UpgradeChannel - """ - - _attribute_map = { - 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) - self.upgrade_channel = kwargs.get('upgrade_channel', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPodIdentity(Model): - """ManagedClusterPodIdentity. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity. - :type name: str - :param namespace: Required. Namespace of the pod identity. - :type namespace: str - :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2020_11_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProvisioningState - :ivar provisioning_info: - :vartype provisioning_info: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProvisioningInfo - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'identity': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_info': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'UserAssignedIdentity'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentity, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.identity = kwargs.get('identity', None) - self.provisioning_state = None - self.provisioning_info = None - - -class ManagedClusterPodIdentityException(Model): - """ManagedClusterPodIdentityException. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity exception. - :type name: str - :param namespace: Required. Namespace of the pod identity exception. - :type namespace: str - :param pod_labels: Required. Pod labels to match. - :type pod_labels: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'pod_labels': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentityException, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.pod_labels = kwargs.get('pod_labels', None) - - -class ManagedClusterPodIdentityProfile(Model): - """ManagedClusterPodIdentityProfile. - - :param enabled: Whether the pod identity addon is enabled. - :type enabled: bool - :param user_assigned_identities: User assigned pod identity settings. - :type user_assigned_identities: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. - :type user_assigned_identity_exceptions: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityException] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '[ManagedClusterPodIdentity]'}, - 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - self.user_assigned_identity_exceptions = kwargs.get('user_assigned_identity_exceptions', None) - - -class ManagedClusterPodIdentityProvisioningInfo(Model): - """ManagedClusterPodIdentityProvisioningInfo. - - :param error: Pod identity assignment error (if any). - :type error: ~azure.mgmt.containerservice.v2020_11_01.models.CloudError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudError'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2020_11_01.models.Expander - :param max_empty_bulk_delete: - :type max_empty_bulk_delete: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - :param max_total_unready_percentage: - :type max_total_unready_percentage: str - :param new_pod_scale_up_delay: - :type new_pod_scale_up_delay: str - :param ok_total_unready_count: - :type ok_total_unready_count: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param skip_nodes_with_local_storage: - :type skip_nodes_with_local_storage: str - :param skip_nodes_with_system_pods: - :type skip_nodes_with_system_pods: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'expander': {'key': 'expander', 'type': 'str'}, - 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, - 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, - 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, - 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) - self.expander = kwargs.get('expander', None) - self.max_empty_bulk_delete = kwargs.get('max_empty_bulk_delete', None) - self.max_graceful_termination_sec = kwargs.get('max_graceful_termination_sec', None) - self.max_total_unready_percentage = kwargs.get('max_total_unready_percentage', None) - self.new_pod_scale_up_delay = kwargs.get('new_pod_scale_up_delay', None) - self.ok_total_unready_count = kwargs.get('ok_total_unready_count', None) - self.scan_interval = kwargs.get('scan_interval', None) - self.scale_down_delay_after_add = kwargs.get('scale_down_delay_after_add', None) - self.scale_down_delay_after_delete = kwargs.get('scale_down_delay_after_delete', None) - self.scale_down_delay_after_failure = kwargs.get('scale_down_delay_after_failure', None) - self.scale_down_unneeded_time = kwargs.get('scale_down_unneeded_time', None) - self.scale_down_unready_time = kwargs.get('scale_down_unready_time', None) - self.scale_down_utilization_threshold = kwargs.get('scale_down_utilization_threshold', None) - self.skip_nodes_with_local_storage = kwargs.get('skip_nodes_with_local_storage', None) - self.skip_nodes_with_system_pods = kwargs.get('skip_nodes_with_system_pods', None) - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" - :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.LicenseType - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.license_type = kwargs.get('license_type', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class PowerState(Model): - """Describes the Power State of the cluster. - - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' - :type code: str or ~azure.mgmt.containerservice.v2020_11_01.models.Code - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PowerState, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkResource(Model): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The ID of the private link resource. - :type id: str - :param name: The name of the private link resource. - :type name: str - :param type: The resource type. - :type type: str - :param group_id: The group ID of the resource. - :type group_id: str - :param required_members: RequiredMembers of the resource - :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. - :vartype private_link_service_id: str - """ - - _validation = { - 'private_link_service_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.group_id = kwargs.get('group_id', None) - self.required_members = kwargs.get('required_members', None) - self.private_link_service_id = None - - -class PrivateLinkResourcesListResult(Model): - """A list of private link resources. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResourcesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class SysctlConfig(Model): - """Sysctl settings for Linux agent nodes. - - :param net_core_somaxconn: Sysctl setting net.core.somaxconn. - :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. - :type net_core_netdev_max_backlog: int - :param net_core_rmem_max: Sysctl setting net.core.rmem_max. - :type net_core_rmem_max: int - :param net_core_wmem_max: Sysctl setting net.core.wmem_max. - :type net_core_wmem_max: int - :param net_core_optmem_max: Sysctl setting net.core.optmem_max. - :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. - :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. - :type net_ipv4_tcp_max_tw_buckets: int - :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. - :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. - :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. - :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. - :type net_ipv4_tcpkeepalive_intvl: int - :param net_ipv4_tcp_rmem: Sysctl setting net.ipv4.tcp_rmem. - :type net_ipv4_tcp_rmem: int - :param net_ipv4_tcp_wmem: Sysctl setting net.ipv4.tcp_wmem. - :type net_ipv4_tcp_wmem: int - :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. - :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. - :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. - :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. - :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. - :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. - :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. - :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. - :type fs_inotify_max_user_watches: int - :param fs_file_max: Sysctl setting fs.file-max. - :type fs_file_max: int - :param fs_aio_max_nr: Sysctl setting fs.aio-max-nr. - :type fs_aio_max_nr: int - :param fs_nr_open: Sysctl setting fs.nr_open. - :type fs_nr_open: int - :param kernel_threads_max: Sysctl setting kernel.threads-max. - :type kernel_threads_max: int - :param vm_max_map_count: Sysctl setting vm.max_map_count. - :type vm_max_map_count: int - :param vm_swappiness: Sysctl setting vm.swappiness. - :type vm_swappiness: int - :param vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. - :type vm_vfs_cache_pressure: int - """ - - _attribute_map = { - 'net_core_somaxconn': {'key': 'netCoreSomaxconn', 'type': 'int'}, - 'net_core_netdev_max_backlog': {'key': 'netCoreNetdevMaxBacklog', 'type': 'int'}, - 'net_core_rmem_max': {'key': 'netCoreRmemMax', 'type': 'int'}, - 'net_core_wmem_max': {'key': 'netCoreWmemMax', 'type': 'int'}, - 'net_core_optmem_max': {'key': 'netCoreOptmemMax', 'type': 'int'}, - 'net_ipv4_tcp_max_syn_backlog': {'key': 'netIpv4TcpMaxSynBacklog', 'type': 'int'}, - 'net_ipv4_tcp_max_tw_buckets': {'key': 'netIpv4TcpMaxTwBuckets', 'type': 'int'}, - 'net_ipv4_tcp_fin_timeout': {'key': 'netIpv4TcpFinTimeout', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_time': {'key': 'netIpv4TcpKeepaliveTime', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_probes': {'key': 'netIpv4TcpKeepaliveProbes', 'type': 'int'}, - 'net_ipv4_tcpkeepalive_intvl': {'key': 'netIpv4TcpkeepaliveIntvl', 'type': 'int'}, - 'net_ipv4_tcp_rmem': {'key': 'netIpv4TcpRmem', 'type': 'int'}, - 'net_ipv4_tcp_wmem': {'key': 'netIpv4TcpWmem', 'type': 'int'}, - 'net_ipv4_tcp_tw_reuse': {'key': 'netIpv4TcpTwReuse', 'type': 'bool'}, - 'net_ipv4_ip_local_port_range': {'key': 'netIpv4IpLocalPortRange', 'type': 'str'}, - 'net_ipv4_neigh_default_gc_thresh1': {'key': 'netIpv4NeighDefaultGcThresh1', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh2': {'key': 'netIpv4NeighDefaultGcThresh2', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh3': {'key': 'netIpv4NeighDefaultGcThresh3', 'type': 'int'}, - 'net_netfilter_nf_conntrack_max': {'key': 'netNetfilterNfConntrackMax', 'type': 'int'}, - 'net_netfilter_nf_conntrack_buckets': {'key': 'netNetfilterNfConntrackBuckets', 'type': 'int'}, - 'fs_inotify_max_user_watches': {'key': 'fsInotifyMaxUserWatches', 'type': 'int'}, - 'fs_file_max': {'key': 'fsFileMax', 'type': 'int'}, - 'fs_aio_max_nr': {'key': 'fsAioMaxNr', 'type': 'int'}, - 'fs_nr_open': {'key': 'fsNrOpen', 'type': 'int'}, - 'kernel_threads_max': {'key': 'kernelThreadsMax', 'type': 'int'}, - 'vm_max_map_count': {'key': 'vmMaxMapCount', 'type': 'int'}, - 'vm_swappiness': {'key': 'vmSwappiness', 'type': 'int'}, - 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SysctlConfig, self).__init__(**kwargs) - self.net_core_somaxconn = kwargs.get('net_core_somaxconn', None) - self.net_core_netdev_max_backlog = kwargs.get('net_core_netdev_max_backlog', None) - self.net_core_rmem_max = kwargs.get('net_core_rmem_max', None) - self.net_core_wmem_max = kwargs.get('net_core_wmem_max', None) - self.net_core_optmem_max = kwargs.get('net_core_optmem_max', None) - self.net_ipv4_tcp_max_syn_backlog = kwargs.get('net_ipv4_tcp_max_syn_backlog', None) - self.net_ipv4_tcp_max_tw_buckets = kwargs.get('net_ipv4_tcp_max_tw_buckets', None) - self.net_ipv4_tcp_fin_timeout = kwargs.get('net_ipv4_tcp_fin_timeout', None) - self.net_ipv4_tcp_keepalive_time = kwargs.get('net_ipv4_tcp_keepalive_time', None) - self.net_ipv4_tcp_keepalive_probes = kwargs.get('net_ipv4_tcp_keepalive_probes', None) - self.net_ipv4_tcpkeepalive_intvl = kwargs.get('net_ipv4_tcpkeepalive_intvl', None) - self.net_ipv4_tcp_rmem = kwargs.get('net_ipv4_tcp_rmem', None) - self.net_ipv4_tcp_wmem = kwargs.get('net_ipv4_tcp_wmem', None) - self.net_ipv4_tcp_tw_reuse = kwargs.get('net_ipv4_tcp_tw_reuse', None) - self.net_ipv4_ip_local_port_range = kwargs.get('net_ipv4_ip_local_port_range', None) - self.net_ipv4_neigh_default_gc_thresh1 = kwargs.get('net_ipv4_neigh_default_gc_thresh1', None) - self.net_ipv4_neigh_default_gc_thresh2 = kwargs.get('net_ipv4_neigh_default_gc_thresh2', None) - self.net_ipv4_neigh_default_gc_thresh3 = kwargs.get('net_ipv4_neigh_default_gc_thresh3', None) - self.net_netfilter_nf_conntrack_max = kwargs.get('net_netfilter_nf_conntrack_max', None) - self.net_netfilter_nf_conntrack_buckets = kwargs.get('net_netfilter_nf_conntrack_buckets', None) - self.fs_inotify_max_user_watches = kwargs.get('fs_inotify_max_user_watches', None) - self.fs_file_max = kwargs.get('fs_file_max', None) - self.fs_aio_max_nr = kwargs.get('fs_aio_max_nr', None) - self.fs_nr_open = kwargs.get('fs_nr_open', None) - self.kernel_threads_max = kwargs.get('kernel_threads_max', None) - self.vm_max_map_count = kwargs.get('vm_max_map_count', None) - self.vm_swappiness = kwargs.get('vm_swappiness', None) - self.vm_vfs_cache_pressure = kwargs.get('vm_vfs_cache_pressure', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_models_py3.py deleted file mode 100644 index a74cbef4668..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_models_py3.py +++ /dev/null @@ -1,2856 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_11_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_11_01.models.LinuxOSConfig - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'properties.podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'properties.kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'properties.linuxOSConfig', 'type': 'LinuxOSConfig'}, - } - - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type - self.vnet_subnet_id = vnet_subnet_id - self.pod_subnet_id = pod_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = None - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.power_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - self.kubelet_config = kubelet_config - self.linux_os_config = linux_os_config - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, latest_node_image_version: str=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - self.latest_node_image_version = latest_node_image_version - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, *, max_surge: str=None, **kwargs) -> None: - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = max_surge - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_11_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_11_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_11_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_11_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_11_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_11_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.network_mode = network_mode - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.outbound_type = outbound_type - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_11_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class KubeletConfig(Model): - """Kubelet configurations of agent nodes. - - :param cpu_manager_policy: CPU Manager policy to use. - :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. - :type cpu_cfs_quota: bool - :param cpu_cfs_quota_period: Sets CPU CFS quota period value. - :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. - :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. - :type image_gc_low_threshold: int - :param topology_manager_policy: Topology Manager policy to use. - :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). - :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. - :type fail_swap_on: bool - """ - - _attribute_map = { - 'cpu_manager_policy': {'key': 'cpuManagerPolicy', 'type': 'str'}, - 'cpu_cfs_quota': {'key': 'cpuCfsQuota', 'type': 'bool'}, - 'cpu_cfs_quota_period': {'key': 'cpuCfsQuotaPeriod', 'type': 'str'}, - 'image_gc_high_threshold': {'key': 'imageGcHighThreshold', 'type': 'int'}, - 'image_gc_low_threshold': {'key': 'imageGcLowThreshold', 'type': 'int'}, - 'topology_manager_policy': {'key': 'topologyManagerPolicy', 'type': 'str'}, - 'allowed_unsafe_sysctls': {'key': 'allowedUnsafeSysctls', 'type': '[str]'}, - 'fail_swap_on': {'key': 'failSwapOn', 'type': 'bool'}, - } - - def __init__(self, *, cpu_manager_policy: str=None, cpu_cfs_quota: bool=None, cpu_cfs_quota_period: str=None, image_gc_high_threshold: int=None, image_gc_low_threshold: int=None, topology_manager_policy: str=None, allowed_unsafe_sysctls=None, fail_swap_on: bool=None, **kwargs) -> None: - super(KubeletConfig, self).__init__(**kwargs) - self.cpu_manager_policy = cpu_manager_policy - self.cpu_cfs_quota = cpu_cfs_quota - self.cpu_cfs_quota_period = cpu_cfs_quota_period - self.image_gc_high_threshold = image_gc_high_threshold - self.image_gc_low_threshold = image_gc_low_threshold - self.topology_manager_policy = topology_manager_policy - self.allowed_unsafe_sysctls = allowed_unsafe_sysctls - self.fail_swap_on = fail_swap_on - - -class LinuxOSConfig(Model): - """OS configurations of Linux agent nodes. - - :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2020_11_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. - :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. - :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. - :type swap_file_size_mb: int - """ - - _attribute_map = { - 'sysctls': {'key': 'sysctls', 'type': 'SysctlConfig'}, - 'transparent_huge_page_enabled': {'key': 'transparentHugePageEnabled', 'type': 'str'}, - 'transparent_huge_page_defrag': {'key': 'transparentHugePageDefrag', 'type': 'str'}, - 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, - } - - def __init__(self, *, sysctls=None, transparent_huge_page_enabled: str=None, transparent_huge_page_defrag: str=None, swap_file_size_mb: int=None, **kwargs) -> None: - super(LinuxOSConfig, self).__init__(**kwargs) - self.sysctls = sysctls - self.transparent_huge_page_enabled = transparent_huge_page_enabled - self.transparent_huge_page_defrag = transparent_huge_page_defrag - self.swap_file_size_mb = swap_file_size_mb - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAddonProfile] - :param pod_identity_profile: Profile of managed cluster pod identity. - :type pod_identity_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAADProfile - :param auto_upgrade_profile: Profile of auto upgrade configuration. - :type auto_upgrade_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, pod_identity_profile=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_upgrade_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, identity=None, sku=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.pod_identity_profile = pod_identity_profile - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.auto_upgrade_profile = auto_upgrade_profile - self.auto_scaler_profile = auto_scaler_profile - self.api_server_access_profile = api_server_access_profile - self.disk_encryption_set_id = disk_encryption_set_id - self.identity_profile = identity_profile - self.identity = identity - self.sku = sku - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, managed: bool=None, enable_azure_rbac: bool=None, admin_group_object_ids=None, client_app_id: str=None, server_app_id: str=None, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = managed - self.enable_azure_rbac = enable_azure_rbac - self.admin_group_object_ids = admin_group_object_ids - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_11_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_11_01.models.LinuxOSConfig - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - } - - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type - self.vnet_subnet_id = vnet_subnet_id - self.pod_subnet_id = pod_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = None - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.power_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - self.kubelet_config = kubelet_config - self.linux_os_config = linux_os_config - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_11_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_11_01.models.LinuxOSConfig - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, os_disk_type=os_disk_type, vnet_subnet_id=vnet_subnet_id, pod_subnet_id=pod_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, upgrade_settings=upgrade_settings, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, proximity_placement_group_id=proximity_placement_group_id, kubelet_config=kubelet_config, linux_os_config=linux_os_config, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - :param private_dns_zone: Private dns zone mode for private cluster. - :type private_dns_zone: str - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, private_dns_zone: str=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - self.private_dns_zone = private_dns_zone - - -class ManagedClusterAutoUpgradeProfile(Model): - """Auto upgrade profile for a managed cluster. - - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2020_11_01.models.UpgradeChannel - """ - - _attribute_map = { - 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, - } - - def __init__(self, *, upgrade_channel=None, **kwargs) -> None: - super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) - self.upgrade_channel = upgrade_channel - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.user_assigned_identities = user_assigned_identities - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - self.allocated_outbound_ports = allocated_outbound_ports - self.idle_timeout_in_minutes = idle_timeout_in_minutes - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPodIdentity(Model): - """ManagedClusterPodIdentity. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity. - :type name: str - :param namespace: Required. Namespace of the pod identity. - :type namespace: str - :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2020_11_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProvisioningState - :ivar provisioning_info: - :vartype provisioning_info: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProvisioningInfo - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'identity': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_info': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'UserAssignedIdentity'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, - } - - def __init__(self, *, name: str, namespace: str, identity, **kwargs) -> None: - super(ManagedClusterPodIdentity, self).__init__(**kwargs) - self.name = name - self.namespace = namespace - self.identity = identity - self.provisioning_state = None - self.provisioning_info = None - - -class ManagedClusterPodIdentityException(Model): - """ManagedClusterPodIdentityException. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity exception. - :type name: str - :param namespace: Required. Namespace of the pod identity exception. - :type namespace: str - :param pod_labels: Required. Pod labels to match. - :type pod_labels: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'pod_labels': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, - } - - def __init__(self, *, name: str, namespace: str, pod_labels, **kwargs) -> None: - super(ManagedClusterPodIdentityException, self).__init__(**kwargs) - self.name = name - self.namespace = namespace - self.pod_labels = pod_labels - - -class ManagedClusterPodIdentityProfile(Model): - """ManagedClusterPodIdentityProfile. - - :param enabled: Whether the pod identity addon is enabled. - :type enabled: bool - :param user_assigned_identities: User assigned pod identity settings. - :type user_assigned_identities: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. - :type user_assigned_identity_exceptions: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityException] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '[ManagedClusterPodIdentity]'}, - 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, - } - - def __init__(self, *, enabled: bool=None, user_assigned_identities=None, user_assigned_identity_exceptions=None, **kwargs) -> None: - super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) - self.enabled = enabled - self.user_assigned_identities = user_assigned_identities - self.user_assigned_identity_exceptions = user_assigned_identity_exceptions - - -class ManagedClusterPodIdentityProvisioningInfo(Model): - """ManagedClusterPodIdentityProvisioningInfo. - - :param error: Pod identity assignment error (if any). - :type error: ~azure.mgmt.containerservice.v2020_11_01.models.CloudError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudError'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) - self.error = error - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2020_11_01.models.Expander - :param max_empty_bulk_delete: - :type max_empty_bulk_delete: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - :param max_total_unready_percentage: - :type max_total_unready_percentage: str - :param new_pod_scale_up_delay: - :type new_pod_scale_up_delay: str - :param ok_total_unready_count: - :type ok_total_unready_count: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param skip_nodes_with_local_storage: - :type skip_nodes_with_local_storage: str - :param skip_nodes_with_system_pods: - :type skip_nodes_with_system_pods: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'expander': {'key': 'expander', 'type': 'str'}, - 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, - 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, - 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, - 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, - } - - def __init__(self, *, balance_similar_node_groups: str=None, expander=None, max_empty_bulk_delete: str=None, max_graceful_termination_sec: str=None, max_total_unready_percentage: str=None, new_pod_scale_up_delay: str=None, ok_total_unready_count: str=None, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, skip_nodes_with_local_storage: str=None, skip_nodes_with_system_pods: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = balance_similar_node_groups - self.expander = expander - self.max_empty_bulk_delete = max_empty_bulk_delete - self.max_graceful_termination_sec = max_graceful_termination_sec - self.max_total_unready_percentage = max_total_unready_percentage - self.new_pod_scale_up_delay = new_pod_scale_up_delay - self.ok_total_unready_count = ok_total_unready_count - self.scan_interval = scan_interval - self.scale_down_delay_after_add = scale_down_delay_after_add - self.scale_down_delay_after_delete = scale_down_delay_after_delete - self.scale_down_delay_after_failure = scale_down_delay_after_failure - self.scale_down_unneeded_time = scale_down_unneeded_time - self.scale_down_unready_time = scale_down_unready_time - self.scale_down_utilization_threshold = scale_down_utilization_threshold - self.skip_nodes_with_local_storage = skip_nodes_with_local_storage - self.skip_nodes_with_system_pods = skip_nodes_with_system_pods - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, tier=None, **kwargs) -> None: - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = name - self.tier = tier - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" - :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2020_11_01.models.LicenseType - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, license_type=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - self.license_type = license_type - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class PowerState(Model): - """Describes the Power State of the cluster. - - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' - :type code: str or ~azure.mgmt.containerservice.v2020_11_01.models.Code - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, *, code=None, **kwargs) -> None: - super(PowerState, self).__init__(**kwargs) - self.code = code - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = id - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, *, private_link_service_connection_state, private_endpoint=None, **kwargs) -> None: - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = value - - -class PrivateLinkResource(Model): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The ID of the private link resource. - :type id: str - :param name: The name of the private link resource. - :type name: str - :param type: The resource type. - :type type: str - :param group_id: The group ID of the resource. - :type group_id: str - :param required_members: RequiredMembers of the resource - :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. - :vartype private_link_service_id: str - """ - - _validation = { - 'private_link_service_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, type: str=None, group_id: str=None, required_members=None, **kwargs) -> None: - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = id - self.name = name - self.type = type - self.group_id = group_id - self.required_members = required_members - self.private_link_service_id = None - - -class PrivateLinkResourcesListResult(Model): - """A list of private link resources. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PrivateLinkResourcesListResult, self).__init__(**kwargs) - self.value = value - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2020_11_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, status=None, description: str=None, **kwargs) -> None: - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = status - self.description = description - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class SysctlConfig(Model): - """Sysctl settings for Linux agent nodes. - - :param net_core_somaxconn: Sysctl setting net.core.somaxconn. - :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. - :type net_core_netdev_max_backlog: int - :param net_core_rmem_max: Sysctl setting net.core.rmem_max. - :type net_core_rmem_max: int - :param net_core_wmem_max: Sysctl setting net.core.wmem_max. - :type net_core_wmem_max: int - :param net_core_optmem_max: Sysctl setting net.core.optmem_max. - :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. - :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. - :type net_ipv4_tcp_max_tw_buckets: int - :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. - :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. - :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. - :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. - :type net_ipv4_tcpkeepalive_intvl: int - :param net_ipv4_tcp_rmem: Sysctl setting net.ipv4.tcp_rmem. - :type net_ipv4_tcp_rmem: int - :param net_ipv4_tcp_wmem: Sysctl setting net.ipv4.tcp_wmem. - :type net_ipv4_tcp_wmem: int - :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. - :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. - :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. - :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. - :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. - :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. - :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. - :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. - :type fs_inotify_max_user_watches: int - :param fs_file_max: Sysctl setting fs.file-max. - :type fs_file_max: int - :param fs_aio_max_nr: Sysctl setting fs.aio-max-nr. - :type fs_aio_max_nr: int - :param fs_nr_open: Sysctl setting fs.nr_open. - :type fs_nr_open: int - :param kernel_threads_max: Sysctl setting kernel.threads-max. - :type kernel_threads_max: int - :param vm_max_map_count: Sysctl setting vm.max_map_count. - :type vm_max_map_count: int - :param vm_swappiness: Sysctl setting vm.swappiness. - :type vm_swappiness: int - :param vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. - :type vm_vfs_cache_pressure: int - """ - - _attribute_map = { - 'net_core_somaxconn': {'key': 'netCoreSomaxconn', 'type': 'int'}, - 'net_core_netdev_max_backlog': {'key': 'netCoreNetdevMaxBacklog', 'type': 'int'}, - 'net_core_rmem_max': {'key': 'netCoreRmemMax', 'type': 'int'}, - 'net_core_wmem_max': {'key': 'netCoreWmemMax', 'type': 'int'}, - 'net_core_optmem_max': {'key': 'netCoreOptmemMax', 'type': 'int'}, - 'net_ipv4_tcp_max_syn_backlog': {'key': 'netIpv4TcpMaxSynBacklog', 'type': 'int'}, - 'net_ipv4_tcp_max_tw_buckets': {'key': 'netIpv4TcpMaxTwBuckets', 'type': 'int'}, - 'net_ipv4_tcp_fin_timeout': {'key': 'netIpv4TcpFinTimeout', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_time': {'key': 'netIpv4TcpKeepaliveTime', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_probes': {'key': 'netIpv4TcpKeepaliveProbes', 'type': 'int'}, - 'net_ipv4_tcpkeepalive_intvl': {'key': 'netIpv4TcpkeepaliveIntvl', 'type': 'int'}, - 'net_ipv4_tcp_rmem': {'key': 'netIpv4TcpRmem', 'type': 'int'}, - 'net_ipv4_tcp_wmem': {'key': 'netIpv4TcpWmem', 'type': 'int'}, - 'net_ipv4_tcp_tw_reuse': {'key': 'netIpv4TcpTwReuse', 'type': 'bool'}, - 'net_ipv4_ip_local_port_range': {'key': 'netIpv4IpLocalPortRange', 'type': 'str'}, - 'net_ipv4_neigh_default_gc_thresh1': {'key': 'netIpv4NeighDefaultGcThresh1', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh2': {'key': 'netIpv4NeighDefaultGcThresh2', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh3': {'key': 'netIpv4NeighDefaultGcThresh3', 'type': 'int'}, - 'net_netfilter_nf_conntrack_max': {'key': 'netNetfilterNfConntrackMax', 'type': 'int'}, - 'net_netfilter_nf_conntrack_buckets': {'key': 'netNetfilterNfConntrackBuckets', 'type': 'int'}, - 'fs_inotify_max_user_watches': {'key': 'fsInotifyMaxUserWatches', 'type': 'int'}, - 'fs_file_max': {'key': 'fsFileMax', 'type': 'int'}, - 'fs_aio_max_nr': {'key': 'fsAioMaxNr', 'type': 'int'}, - 'fs_nr_open': {'key': 'fsNrOpen', 'type': 'int'}, - 'kernel_threads_max': {'key': 'kernelThreadsMax', 'type': 'int'}, - 'vm_max_map_count': {'key': 'vmMaxMapCount', 'type': 'int'}, - 'vm_swappiness': {'key': 'vmSwappiness', 'type': 'int'}, - 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, - } - - def __init__(self, *, net_core_somaxconn: int=None, net_core_netdev_max_backlog: int=None, net_core_rmem_max: int=None, net_core_wmem_max: int=None, net_core_optmem_max: int=None, net_ipv4_tcp_max_syn_backlog: int=None, net_ipv4_tcp_max_tw_buckets: int=None, net_ipv4_tcp_fin_timeout: int=None, net_ipv4_tcp_keepalive_time: int=None, net_ipv4_tcp_keepalive_probes: int=None, net_ipv4_tcpkeepalive_intvl: int=None, net_ipv4_tcp_rmem: int=None, net_ipv4_tcp_wmem: int=None, net_ipv4_tcp_tw_reuse: bool=None, net_ipv4_ip_local_port_range: str=None, net_ipv4_neigh_default_gc_thresh1: int=None, net_ipv4_neigh_default_gc_thresh2: int=None, net_ipv4_neigh_default_gc_thresh3: int=None, net_netfilter_nf_conntrack_max: int=None, net_netfilter_nf_conntrack_buckets: int=None, fs_inotify_max_user_watches: int=None, fs_file_max: int=None, fs_aio_max_nr: int=None, fs_nr_open: int=None, kernel_threads_max: int=None, vm_max_map_count: int=None, vm_swappiness: int=None, vm_vfs_cache_pressure: int=None, **kwargs) -> None: - super(SysctlConfig, self).__init__(**kwargs) - self.net_core_somaxconn = net_core_somaxconn - self.net_core_netdev_max_backlog = net_core_netdev_max_backlog - self.net_core_rmem_max = net_core_rmem_max - self.net_core_wmem_max = net_core_wmem_max - self.net_core_optmem_max = net_core_optmem_max - self.net_ipv4_tcp_max_syn_backlog = net_ipv4_tcp_max_syn_backlog - self.net_ipv4_tcp_max_tw_buckets = net_ipv4_tcp_max_tw_buckets - self.net_ipv4_tcp_fin_timeout = net_ipv4_tcp_fin_timeout - self.net_ipv4_tcp_keepalive_time = net_ipv4_tcp_keepalive_time - self.net_ipv4_tcp_keepalive_probes = net_ipv4_tcp_keepalive_probes - self.net_ipv4_tcpkeepalive_intvl = net_ipv4_tcpkeepalive_intvl - self.net_ipv4_tcp_rmem = net_ipv4_tcp_rmem - self.net_ipv4_tcp_wmem = net_ipv4_tcp_wmem - self.net_ipv4_tcp_tw_reuse = net_ipv4_tcp_tw_reuse - self.net_ipv4_ip_local_port_range = net_ipv4_ip_local_port_range - self.net_ipv4_neigh_default_gc_thresh1 = net_ipv4_neigh_default_gc_thresh1 - self.net_ipv4_neigh_default_gc_thresh2 = net_ipv4_neigh_default_gc_thresh2 - self.net_ipv4_neigh_default_gc_thresh3 = net_ipv4_neigh_default_gc_thresh3 - self.net_netfilter_nf_conntrack_max = net_netfilter_nf_conntrack_max - self.net_netfilter_nf_conntrack_buckets = net_netfilter_nf_conntrack_buckets - self.fs_inotify_max_user_watches = fs_inotify_max_user_watches - self.fs_file_max = fs_file_max - self.fs_aio_max_nr = fs_aio_max_nr - self.fs_nr_open = fs_nr_open - self.kernel_threads_max = kernel_threads_max - self.vm_max_map_count = vm_max_map_count - self.vm_swappiness = vm_swappiness - self.vm_vfs_cache_pressure = vm_vfs_cache_pressure - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_paged_models.py deleted file mode 100644 index 2dcbefb96b4..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_paged_models.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/__init__.py deleted file mode 100644 index fecbc32dd78..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._managed_clusters_operations import ManagedClustersOperations -from ._agent_pools_operations import AgentPoolsOperations -from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations -from ._private_link_resources_operations import PrivateLinkResourcesOperations -from ._resolve_private_link_service_id_operations import ResolvePrivateLinkServiceIdOperations - -__all__ = [ - 'Operations', - 'ManagedClustersOperations', - 'AgentPoolsOperations', - 'PrivateEndpointConnectionsOperations', - 'PrivateLinkResourcesOperations', - 'ResolvePrivateLinkServiceIdOperations', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_managed_clusters_operations.py deleted file mode 100644 index 50eeab5c613..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1301 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-11-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-11-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. **WARNING**: This API - will be deprecated. Instead use - [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) - or - [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) - . - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} - - - def _stop_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def stop( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Stop Managed Cluster. - - Stops a Running Managed Cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} - - - def _start_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Start Managed Cluster. - - Starts a Stopped Managed Cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_operations.py deleted file mode 100644 index 0b9096e8623..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-11-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-11-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2020_11_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_private_endpoint_connections_operations.py deleted file mode 100644 index ee1c4f458ef..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_private_endpoint_connections_operations.py +++ /dev/null @@ -1,348 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class PrivateEndpointConnectionsOperations(object): - """PrivateEndpointConnectionsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-11-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-11-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private endpoint connections in the specified managed - cluster. - - Gets a list of private endpoint connections in the specified managed - cluster. The operation returns properties of each private endpoint - connection. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnectionListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnectionListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} - - def get( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """Gets the private endpoint connection. - - Gets the details of the private endpoint connection by managed cluster - and resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def update( - self, resource_group_name, resource_name, private_endpoint_connection_name, private_link_service_connection_state, private_endpoint=None, custom_headers=None, raw=False, **operation_config): - """Updates a private endpoint connection. - - Updates a private endpoint connection in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param private_link_service_connection_state: A collection of - information about the state of the connection between service consumer - and provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkServiceConnectionState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpoint - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a private endpoint connection. - - Deletes the private endpoint connection in the specified managed - cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_private_link_resources_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_private_link_resources_operations.py deleted file mode 100644 index 0c39d2f2ae1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_private_link_resources_operations.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class PrivateLinkResourcesOperations(object): - """PrivateLinkResourcesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-11-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-11-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private link resources in the specified managed cluster. - - Gets a list of private link resources in the specified managed cluster. - The operation returns properties of each private link resource. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResourcesListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResourcesListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_resolve_private_link_service_id_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_resolve_private_link_service_id_operations.py deleted file mode 100644 index 57ab2473c14..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_resolve_private_link_service_id_operations.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ResolvePrivateLinkServiceIdOperations(object): - """ResolvePrivateLinkServiceIdOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-11-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-11-01" - - self.config = config - - def post( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - """Gets the private link service ID for the specified managed cluster. - - Gets the private link service ID the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters (name, groupId) supplied in order to - resolve a private link service ID. - :type parameters: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.post.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateLinkResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/version.py deleted file mode 100644 index 12be8e5cdee..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2020-11-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/__init__.py old mode 100644 new mode 100755 index b7cb9d01cb1..eb3d7ba7a26 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/__init__.py @@ -1,19 +1,16 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._configuration import ContainerServiceClientConfiguration from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION +__all__ = ['ContainerServiceClient'] +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/_configuration.py old mode 100644 new mode 100755 index e94fbc7005d..df9ec3d69a1 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/_configuration.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/_configuration.py @@ -1,50 +1,70 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration -from .version import VERSION +from typing import TYPE_CHECKING +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient Note that all parameters used to create this instance are saved as instance attributes. - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str - :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials + self.credential = credential self.subscription_id = subscription_id + self.api_version = "2020-12-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/_container_service_client.py old mode 100644 new mode 100755 index 87285cca242..99757c3b160 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/_container_service_client.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/_container_service_client.py @@ -1,16 +1,22 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import ContainerServiceClientConfiguration from .operations import Operations @@ -23,59 +29,91 @@ from . import models -class ContainerServiceClient(SDKClient): +class ContainerServiceClient(object): """The Container Service Client. - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - :ivar operations: Operations operations :vartype operations: azure.mgmt.containerservice.v2020_12_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations + :ivar managed_clusters: ManagedClustersOperations operations :vartype managed_clusters: azure.mgmt.containerservice.v2020_12_01.operations.ManagedClustersOperations - :ivar maintenance_configurations: MaintenanceConfigurations operations + :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations :vartype maintenance_configurations: azure.mgmt.containerservice.v2020_12_01.operations.MaintenanceConfigurationsOperations - :ivar agent_pools: AgentPools operations + :ivar agent_pools: AgentPoolsOperations operations :vartype agent_pools: azure.mgmt.containerservice.v2020_12_01.operations.AgentPoolsOperations - :ivar private_endpoint_connections: PrivateEndpointConnections operations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: azure.mgmt.containerservice.v2020_12_01.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResources operations + :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.containerservice.v2020_12_01.operations.PrivateLinkResourcesOperations - :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceId operations + :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2020_12_01.operations.ResolvePrivateLinkServiceIdOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-12-01' self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.maintenance_configurations = MaintenanceConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> ContainerServiceClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/__init__.py new file mode 100755 index 00000000000..4ad2bb20096 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._container_service_client import ContainerServiceClient +__all__ = ['ContainerServiceClient'] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/_configuration.py new file mode 100755 index 00000000000..f1409a83c25 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/_configuration.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2020-12-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/_container_service_client.py new file mode 100755 index 00000000000..886a31c0e7b --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/_container_service_client.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import ContainerServiceClientConfiguration +from .operations import Operations +from .operations import ManagedClustersOperations +from .operations import MaintenanceConfigurationsOperations +from .operations import AgentPoolsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import ResolvePrivateLinkServiceIdOperations +from .. import models + + +class ContainerServiceClient(object): + """The Container Service Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerservice.v2020_12_01.aio.operations.Operations + :ivar managed_clusters: ManagedClustersOperations operations + :vartype managed_clusters: azure.mgmt.containerservice.v2020_12_01.aio.operations.ManagedClustersOperations + :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations + :vartype maintenance_configurations: azure.mgmt.containerservice.v2020_12_01.aio.operations.MaintenanceConfigurationsOperations + :ivar agent_pools: AgentPoolsOperations operations + :vartype agent_pools: azure.mgmt.containerservice.v2020_12_01.aio.operations.AgentPoolsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.containerservice.v2020_12_01.aio.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.containerservice.v2020_12_01.aio.operations.PrivateLinkResourcesOperations + :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations + :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2020_12_01.aio.operations.ResolvePrivateLinkServiceIdOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.managed_clusters = ManagedClustersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.maintenance_configurations = MaintenanceConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.agent_pools = AgentPoolsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "ContainerServiceClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/__init__.py old mode 100644 new mode 100755 similarity index 95% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/__init__.py rename to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/__init__.py index d7bfa3f00fe..3942e0ca6a0 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/__init__.py @@ -1,12 +1,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from ._operations import Operations diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_agent_pools_operations.py new file mode 100755 index 00000000000..44c927942f0 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_agent_pools_operations.py @@ -0,0 +1,689 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AgentPoolsOperations: + """AgentPoolsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AgentPoolListResult"]: + """Gets a list of agent pools in the specified managed cluster. + + Gets a list of agent pools in the specified managed cluster. The operation returns properties + of each agent pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPoolListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AgentPoolListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> "_models.AgentPool": + """Gets the agent pool. + + Gets the details of the agent pool by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPool, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: "_models.AgentPool", + **kwargs: Any + ) -> "_models.AgentPool": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AgentPool') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: "_models.AgentPool", + **kwargs: Any + ) -> AsyncLROPoller["_models.AgentPool"]: + """Creates or updates an agent pool. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :param parameters: Parameters supplied to the Create or Update an agent pool operation. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AgentPool or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an agent pool. + + Deletes the agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def get_upgrade_profile( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> "_models.AgentPoolUpgradeProfile": + """Gets upgrade profile for an agent pool. + + Gets the details of the upgrade profile for an agent pool with a specified resource group and + managed cluster name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_upgrade_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPoolUpgradeProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} # type: ignore + + async def get_available_agent_pool_versions( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.AgentPoolAvailableVersions": + """Gets a list of supported versions for the specified agent pool. + + Gets a list of supported versions for the specified agent pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolAvailableVersions, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolAvailableVersions + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolAvailableVersions"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_available_agent_pool_versions.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPoolAvailableVersions', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} # type: ignore + + async def _upgrade_node_image_version_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> Optional["_models.AgentPool"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AgentPool"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._upgrade_node_image_version_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _upgrade_node_image_version_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore + + async def begin_upgrade_node_image_version( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.AgentPool"]: + """Upgrade node image version of an agent pool to the latest. + + Upgrade node image version of an agent pool to the latest. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._upgrade_node_image_version_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_maintenance_configurations_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_maintenance_configurations_operations.py new file mode 100755 index 00000000000..2093362e5e0 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_maintenance_configurations_operations.py @@ -0,0 +1,317 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MaintenanceConfigurationsOperations: + """MaintenanceConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_managed_cluster( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.MaintenanceConfigurationListResult"]: + """Gets a list of maintenance configurations in the specified managed cluster. + + Gets a list of maintenance configurations in the specified managed cluster. The operation + returns properties of each maintenance configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MaintenanceConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_managed_cluster.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('MaintenanceConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_managed_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + **kwargs: Any + ) -> "_models.MaintenanceConfiguration": + """Gets the maintenance configuration. + + Gets the details of maintenance configurations by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'configName': self._serialize.url("config_name", config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: "_models.MaintenanceConfiguration", + **kwargs: Any + ) -> "_models.MaintenanceConfiguration": + """Creates or updates a maintenance configurations. + + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :param parameters: Parameters supplied to the Create or Update a default maintenance + configuration. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'configName': self._serialize.url("config_name", config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'MaintenanceConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + **kwargs: Any + ) -> None: + """Deletes a maintenance configuration. + + Deletes the maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'configName': self._serialize.url("config_name", config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_managed_clusters_operations.py new file mode 100755 index 00000000000..5632558d944 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_managed_clusters_operations.py @@ -0,0 +1,1496 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ManagedClustersOperations: + """ManagedClustersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ManagedClusterListResult"]: + """Gets a list of managed clusters in the specified subscription. + + Gets a list of managed clusters in the specified subscription. The operation returns properties + of each managed cluster. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ManagedClusterListResult"]: + """Lists managed clusters in the specified subscription and resource group. + + Lists managed clusters in the specified subscription and resource group. The operation returns + properties of each managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + async def get_upgrade_profile( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.ManagedClusterUpgradeProfile": + """Gets upgrade profile for a managed cluster. + + Gets the details of the upgrade profile for a managed cluster with a specified resource group + and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_upgrade_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterUpgradeProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} # type: ignore + + async def get_access_profile( + self, + resource_group_name: str, + resource_name: str, + role_name: str, + **kwargs: Any + ) -> "_models.ManagedClusterAccessProfile": + """Gets an access profile of a managed cluster. + + Gets the accessProfile for the specified role name of the managed cluster with a specified + resource group and name. **WARNING**\ : This API will be deprecated. Instead use + `ListClusterUserCredentials + `_ or + `ListClusterAdminCredentials + `_ . + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param role_name: The name of the role for managed cluster accessProfile resource. + :type role_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAccessProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterAccessProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get_access_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterAccessProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} # type: ignore + + async def list_cluster_admin_credentials( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.CredentialResults": + """Gets cluster admin credential of a managed cluster. + + Gets cluster admin credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_admin_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} # type: ignore + + async def list_cluster_user_credentials( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.CredentialResults": + """Gets cluster user credential of a managed cluster. + + Gets cluster user credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} # type: ignore + + async def list_cluster_monitoring_user_credentials( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.CredentialResults": + """Gets cluster monitoring user credential of a managed cluster. + + Gets cluster monitoring user credential of the managed cluster with a specified resource group + and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_monitoring_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.ManagedCluster": + """Gets a managed cluster. + + Gets the details of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedCluster, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedCluster", + **kwargs: Any + ) -> "_models.ManagedCluster": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedCluster') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedCluster", + **kwargs: Any + ) -> AsyncLROPoller["_models.ManagedCluster"]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster with the specified configuration for agents and Kubernetes + version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _update_tags_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ManagedCluster": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_tags_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> AsyncLROPoller["_models.ManagedCluster"]: + """Updates tags on a managed cluster. + + Updates a managed cluster with the specified tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a managed cluster. + + Deletes the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _reset_service_principal_profile_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterServicePrincipalProfile", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_service_principal_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_service_principal_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + async def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterServicePrincipalProfile", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset Service Principal Profile of a managed cluster. + + Update the service principal Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a + Managed Cluster. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterServicePrincipalProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_service_principal_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + async def _reset_aad_profile_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterAADProfile", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_aad_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_aad_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + async def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterAADProfile", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset AAD Profile of a managed cluster. + + Update the AAD Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed + Cluster. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_aad_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + async def _rotate_cluster_certificates_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._rotate_cluster_certificates_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _rotate_cluster_certificates_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore + + async def begin_rotate_cluster_certificates( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Rotate certificates of a managed cluster. + + Rotate certificates of a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._rotate_cluster_certificates_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore + + async def _stop_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._stop_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore + + async def begin_stop( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Stop Managed Cluster. + + Stops a Running Managed Cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._stop_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore + + async def _start_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._start_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore + + async def begin_start( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Start Managed Cluster. + + Starts a Stopped Managed Cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_operations.py new file mode 100755 index 00000000000..b667836960f --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.OperationListResult"]: + """Gets a list of compute operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_private_endpoint_connections_operations.py new file mode 100755 index 00000000000..3571ebaa53b --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,357 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations: + """PrivateEndpointConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnectionListResult": + """Gets a list of private endpoint connections in the specified managed cluster. + + Gets a list of private endpoint connections in the specified managed cluster. The operation + returns properties of each private endpoint connection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnectionListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Gets the private endpoint connection. + + Gets the details of the private endpoint connection by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Updates a private endpoint connection. + + Updates a private endpoint connection in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param parameters: Parameters supplied to the Update a private endpoint connection operation. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a private endpoint connection. + + Deletes the private endpoint connection in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_private_link_resources_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_private_link_resources_operations.py new file mode 100755 index 00000000000..c61ba658b05 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_private_link_resources_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations: + """PrivateLinkResourcesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.PrivateLinkResourcesListResult": + """Gets a list of private link resources in the specified managed cluster. + + Gets a list of private link resources in the specified managed cluster. The operation returns + properties of each private link resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResourcesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourcesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_resolve_private_link_service_id_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_resolve_private_link_service_id_operations.py new file mode 100755 index 00000000000..bbaa926aee3 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ResolvePrivateLinkServiceIdOperations: + """ResolvePrivateLinkServiceIdOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def post( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.PrivateLinkResource", + **kwargs: Any + ) -> "_models.PrivateLinkResource": + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters (name, groupId) supplied in order to resolve a private link + service ID. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.post.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateLinkResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/__init__.py old mode 100644 new mode 100755 index 2bc982b2802..c0c6aed90fb --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/__init__.py @@ -1,21 +1,24 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- try: from ._models_py3 import AgentPool from ._models_py3 import AgentPoolAvailableVersions from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem + from ._models_py3 import AgentPoolListResult from ._models_py3 import AgentPoolUpgradeProfile from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem from ._models_py3 import AgentPoolUpgradeSettings + from ._models_py3 import CloudError + from ._models_py3 import CloudErrorBody + from ._models_py3 import Components1Q1Og48SchemasManagedclusterAllof1 + from ._models_py3 import Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties + from ._models_py3 import ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties from ._models_py3 import ContainerServiceDiagnosticsProfile from ._models_py3 import ContainerServiceLinuxProfile from ._models_py3 import ContainerServiceMasterProfile @@ -28,17 +31,18 @@ from ._models_py3 import KubeletConfig from ._models_py3 import LinuxOSConfig from ._models_py3 import MaintenanceConfiguration + from ._models_py3 import MaintenanceConfigurationListResult from ._models_py3 import ManagedCluster from ._models_py3 import ManagedClusterAADProfile + from ._models_py3 import ManagedClusterAPIServerAccessProfile from ._models_py3 import ManagedClusterAccessProfile from ._models_py3 import ManagedClusterAddonProfile from ._models_py3 import ManagedClusterAddonProfileIdentity from ._models_py3 import ManagedClusterAgentPoolProfile from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile from ._models_py3 import ManagedClusterAutoUpgradeProfile from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterIdentityUserAssignedIdentitiesValue + from ._models_py3 import ManagedClusterListResult from ._models_py3 import ManagedClusterLoadBalancerProfile from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes @@ -50,11 +54,11 @@ from ._models_py3 import ManagedClusterPoolUpgradeProfile from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile from ._models_py3 import ManagedClusterSKU + from ._models_py3 import ManagedClusterServicePrincipalProfile from ._models_py3 import ManagedClusterUpgradeProfile from ._models_py3 import ManagedClusterWindowsProfile + from ._models_py3 import OperationListResult from ._models_py3 import OperationValue from ._models_py3 import PowerState from ._models_py3 import PrivateEndpoint @@ -73,108 +77,119 @@ from ._models_py3 import TimeSpan from ._models_py3 import UserAssignedIdentity except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import AgentPoolUpgradeSettings - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import KubeletConfig - from ._models import LinuxOSConfig - from ._models import MaintenanceConfiguration - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterAutoUpgradeProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPodIdentity - from ._models import ManagedClusterPodIdentityException - from ._models import ManagedClusterPodIdentityProfile - from ._models import ManagedClusterPodIdentityProvisioningInfo - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterSKU - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import PowerState - from ._models import PrivateEndpoint - from ._models import PrivateEndpointConnection - from ._models import PrivateEndpointConnectionListResult - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourcesListResult - from ._models import PrivateLinkServiceConnectionState - from ._models import Resource - from ._models import ResourceReference - from ._models import SubResource - from ._models import SysctlConfig - from ._models import SystemData - from ._models import TagsObject - from ._models import TimeInWeek - from ._models import TimeSpan - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import MaintenanceConfigurationPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged + from ._models import AgentPool # type: ignore + from ._models import AgentPoolAvailableVersions # type: ignore + from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem # type: ignore + from ._models import AgentPoolListResult # type: ignore + from ._models import AgentPoolUpgradeProfile # type: ignore + from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem # type: ignore + from ._models import AgentPoolUpgradeSettings # type: ignore + from ._models import CloudError # type: ignore + from ._models import CloudErrorBody # type: ignore + from ._models import Components1Q1Og48SchemasManagedclusterAllof1 # type: ignore + from ._models import Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties # type: ignore + from ._models import ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties # type: ignore + from ._models import ContainerServiceDiagnosticsProfile # type: ignore + from ._models import ContainerServiceLinuxProfile # type: ignore + from ._models import ContainerServiceMasterProfile # type: ignore + from ._models import ContainerServiceNetworkProfile # type: ignore + from ._models import ContainerServiceSshConfiguration # type: ignore + from ._models import ContainerServiceSshPublicKey # type: ignore + from ._models import ContainerServiceVMDiagnostics # type: ignore + from ._models import CredentialResult # type: ignore + from ._models import CredentialResults # type: ignore + from ._models import KubeletConfig # type: ignore + from ._models import LinuxOSConfig # type: ignore + from ._models import MaintenanceConfiguration # type: ignore + from ._models import MaintenanceConfigurationListResult # type: ignore + from ._models import ManagedCluster # type: ignore + from ._models import ManagedClusterAADProfile # type: ignore + from ._models import ManagedClusterAPIServerAccessProfile # type: ignore + from ._models import ManagedClusterAccessProfile # type: ignore + from ._models import ManagedClusterAddonProfile # type: ignore + from ._models import ManagedClusterAddonProfileIdentity # type: ignore + from ._models import ManagedClusterAgentPoolProfile # type: ignore + from ._models import ManagedClusterAgentPoolProfileProperties # type: ignore + from ._models import ManagedClusterAutoUpgradeProfile # type: ignore + from ._models import ManagedClusterIdentity # type: ignore + from ._models import ManagedClusterListResult # type: ignore + from ._models import ManagedClusterLoadBalancerProfile # type: ignore + from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs # type: ignore + from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes # type: ignore + from ._models import ManagedClusterLoadBalancerProfileOutboundIPs # type: ignore + from ._models import ManagedClusterPodIdentity # type: ignore + from ._models import ManagedClusterPodIdentityException # type: ignore + from ._models import ManagedClusterPodIdentityProfile # type: ignore + from ._models import ManagedClusterPodIdentityProvisioningInfo # type: ignore + from ._models import ManagedClusterPoolUpgradeProfile # type: ignore + from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem # type: ignore + from ._models import ManagedClusterPropertiesAutoScalerProfile # type: ignore + from ._models import ManagedClusterSKU # type: ignore + from ._models import ManagedClusterServicePrincipalProfile # type: ignore + from ._models import ManagedClusterUpgradeProfile # type: ignore + from ._models import ManagedClusterWindowsProfile # type: ignore + from ._models import OperationListResult # type: ignore + from ._models import OperationValue # type: ignore + from ._models import PowerState # type: ignore + from ._models import PrivateEndpoint # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateLinkResource # type: ignore + from ._models import PrivateLinkResourcesListResult # type: ignore + from ._models import PrivateLinkServiceConnectionState # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceReference # type: ignore + from ._models import SubResource # type: ignore + from ._models import SysctlConfig # type: ignore + from ._models import SystemData # type: ignore + from ._models import TagsObject # type: ignore + from ._models import TimeInWeek # type: ignore + from ._models import TimeSpan # type: ignore + from ._models import UserAssignedIdentity # type: ignore + from ._container_service_client_enums import ( + AgentPoolMode, + AgentPoolType, + Code, + ConnectionStatus, ContainerServiceStorageProfileTypes, ContainerServiceVMSizeTypes, - OSDiskType, + Count, + CreatedByType, + Expander, KubeletDiskType, - OSType, - AgentPoolType, - AgentPoolMode, - Code, - ScaleSetPriority, - ScaleSetEvictionPolicy, LicenseType, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, LoadBalancerSku, - CreatedByType, - WeekDay, ManagedClusterPodIdentityProvisioningState, - UpgradeChannel, - Expander, - ResourceIdentityType, ManagedClusterSKUName, ManagedClusterSKUTier, + NetworkMode, + NetworkPlugin, + NetworkPolicy, + OSDiskType, + OSType, + OutboundType, PrivateEndpointConnectionProvisioningState, - ConnectionStatus, + ResourceIdentityType, + ScaleSetEvictionPolicy, + ScaleSetPriority, + UpgradeChannel, + WeekDay, ) __all__ = [ 'AgentPool', 'AgentPoolAvailableVersions', 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', + 'AgentPoolListResult', 'AgentPoolUpgradeProfile', 'AgentPoolUpgradeProfilePropertiesUpgradesItem', 'AgentPoolUpgradeSettings', + 'CloudError', + 'CloudErrorBody', + 'Components1Q1Og48SchemasManagedclusterAllof1', + 'Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties', + 'ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties', 'ContainerServiceDiagnosticsProfile', 'ContainerServiceLinuxProfile', 'ContainerServiceMasterProfile', @@ -187,17 +202,18 @@ 'KubeletConfig', 'LinuxOSConfig', 'MaintenanceConfiguration', + 'MaintenanceConfigurationListResult', 'ManagedCluster', 'ManagedClusterAADProfile', + 'ManagedClusterAPIServerAccessProfile', 'ManagedClusterAccessProfile', 'ManagedClusterAddonProfile', 'ManagedClusterAddonProfileIdentity', 'ManagedClusterAgentPoolProfile', 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', 'ManagedClusterAutoUpgradeProfile', 'ManagedClusterIdentity', - 'ManagedClusterIdentityUserAssignedIdentitiesValue', + 'ManagedClusterListResult', 'ManagedClusterLoadBalancerProfile', 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', @@ -209,11 +225,11 @@ 'ManagedClusterPoolUpgradeProfile', 'ManagedClusterPoolUpgradeProfileUpgradesItem', 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', 'ManagedClusterSKU', + 'ManagedClusterServicePrincipalProfile', 'ManagedClusterUpgradeProfile', 'ManagedClusterWindowsProfile', + 'OperationListResult', 'OperationValue', 'PowerState', 'PrivateEndpoint', @@ -231,34 +247,31 @@ 'TimeInWeek', 'TimeSpan', 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'MaintenanceConfigurationPaged', - 'AgentPoolPaged', + 'AgentPoolMode', + 'AgentPoolType', + 'Code', + 'ConnectionStatus', 'ContainerServiceStorageProfileTypes', 'ContainerServiceVMSizeTypes', - 'OSDiskType', + 'Count', + 'CreatedByType', + 'Expander', 'KubeletDiskType', - 'OSType', - 'AgentPoolType', - 'AgentPoolMode', - 'Code', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', 'LicenseType', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', 'LoadBalancerSku', - 'CreatedByType', - 'WeekDay', 'ManagedClusterPodIdentityProvisioningState', - 'UpgradeChannel', - 'Expander', - 'ResourceIdentityType', 'ManagedClusterSKUName', 'ManagedClusterSKUTier', + 'NetworkMode', + 'NetworkPlugin', + 'NetworkPolicy', + 'OSDiskType', + 'OSType', + 'OutboundType', 'PrivateEndpointConnectionProvisioningState', - 'ConnectionStatus', + 'ResourceIdentityType', + 'ScaleSetEvictionPolicy', + 'ScaleSetPriority', + 'UpgradeChannel', + 'WeekDay', ] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_container_service_client_enums.py old mode 100644 new mode 100755 index 0b087718c1a..77894303644 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_container_service_client_enums.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_container_service_client_enums.py @@ -1,356 +1,412 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSDiskType(str, Enum): +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AgentPoolMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """AgentPoolMode represents mode of an agent pool. + """ + + SYSTEM = "System" + USER = "User" + +class AgentPoolType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """AgentPoolType represents types of an agent pool. + """ + + VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" + AVAILABILITY_SET = "AvailabilitySet" + +class Code(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tells whether the cluster is Running or Stopped + """ + + RUNNING = "Running" + STOPPED = "Stopped" + +class ConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The private link service connection status. + """ + + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + DISCONNECTED = "Disconnected" + +class ContainerServiceStorageProfileTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Storage profile specifies what kind of storage used. Choose from StorageAccount and + ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. + """ + + STORAGE_ACCOUNT = "StorageAccount" + MANAGED_DISKS = "ManagedDisks" + +class ContainerServiceVMSizeTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Size of agent VMs. + """ + + STANDARD_A1 = "Standard_A1" + STANDARD_A10 = "Standard_A10" + STANDARD_A11 = "Standard_A11" + STANDARD_A1_V2 = "Standard_A1_v2" + STANDARD_A2 = "Standard_A2" + STANDARD_A2_V2 = "Standard_A2_v2" + STANDARD_A2_M_V2 = "Standard_A2m_v2" + STANDARD_A3 = "Standard_A3" + STANDARD_A4 = "Standard_A4" + STANDARD_A4_V2 = "Standard_A4_v2" + STANDARD_A4_M_V2 = "Standard_A4m_v2" + STANDARD_A5 = "Standard_A5" + STANDARD_A6 = "Standard_A6" + STANDARD_A7 = "Standard_A7" + STANDARD_A8 = "Standard_A8" + STANDARD_A8_V2 = "Standard_A8_v2" + STANDARD_A8_M_V2 = "Standard_A8m_v2" + STANDARD_A9 = "Standard_A9" + STANDARD_B2_MS = "Standard_B2ms" + STANDARD_B2_S = "Standard_B2s" + STANDARD_B4_MS = "Standard_B4ms" + STANDARD_B8_MS = "Standard_B8ms" + STANDARD_D1 = "Standard_D1" + STANDARD_D11 = "Standard_D11" + STANDARD_D11_V2 = "Standard_D11_v2" + STANDARD_D11_V2_PROMO = "Standard_D11_v2_Promo" + STANDARD_D12 = "Standard_D12" + STANDARD_D12_V2 = "Standard_D12_v2" + STANDARD_D12_V2_PROMO = "Standard_D12_v2_Promo" + STANDARD_D13 = "Standard_D13" + STANDARD_D13_V2 = "Standard_D13_v2" + STANDARD_D13_V2_PROMO = "Standard_D13_v2_Promo" + STANDARD_D14 = "Standard_D14" + STANDARD_D14_V2 = "Standard_D14_v2" + STANDARD_D14_V2_PROMO = "Standard_D14_v2_Promo" + STANDARD_D15_V2 = "Standard_D15_v2" + STANDARD_D16_V3 = "Standard_D16_v3" + STANDARD_D16_S_V3 = "Standard_D16s_v3" + STANDARD_D1_V2 = "Standard_D1_v2" + STANDARD_D2 = "Standard_D2" + STANDARD_D2_V2 = "Standard_D2_v2" + STANDARD_D2_V2_PROMO = "Standard_D2_v2_Promo" + STANDARD_D2_V3 = "Standard_D2_v3" + STANDARD_D2_S_V3 = "Standard_D2s_v3" + STANDARD_D3 = "Standard_D3" + STANDARD_D32_V3 = "Standard_D32_v3" + STANDARD_D32_S_V3 = "Standard_D32s_v3" + STANDARD_D3_V2 = "Standard_D3_v2" + STANDARD_D3_V2_PROMO = "Standard_D3_v2_Promo" + STANDARD_D4 = "Standard_D4" + STANDARD_D4_V2 = "Standard_D4_v2" + STANDARD_D4_V2_PROMO = "Standard_D4_v2_Promo" + STANDARD_D4_V3 = "Standard_D4_v3" + STANDARD_D4_S_V3 = "Standard_D4s_v3" + STANDARD_D5_V2 = "Standard_D5_v2" + STANDARD_D5_V2_PROMO = "Standard_D5_v2_Promo" + STANDARD_D64_V3 = "Standard_D64_v3" + STANDARD_D64_S_V3 = "Standard_D64s_v3" + STANDARD_D8_V3 = "Standard_D8_v3" + STANDARD_D8_S_V3 = "Standard_D8s_v3" + STANDARD_DS1 = "Standard_DS1" + STANDARD_DS11 = "Standard_DS11" + STANDARD_DS11_V2 = "Standard_DS11_v2" + STANDARD_DS11_V2_PROMO = "Standard_DS11_v2_Promo" + STANDARD_DS12 = "Standard_DS12" + STANDARD_DS12_V2 = "Standard_DS12_v2" + STANDARD_DS12_V2_PROMO = "Standard_DS12_v2_Promo" + STANDARD_DS13 = "Standard_DS13" + STANDARD_DS13_2_V2 = "Standard_DS13-2_v2" + STANDARD_DS13_4_V2 = "Standard_DS13-4_v2" + STANDARD_DS13_V2 = "Standard_DS13_v2" + STANDARD_DS13_V2_PROMO = "Standard_DS13_v2_Promo" + STANDARD_DS14 = "Standard_DS14" + STANDARD_DS14_4_V2 = "Standard_DS14-4_v2" + STANDARD_DS14_8_V2 = "Standard_DS14-8_v2" + STANDARD_DS14_V2 = "Standard_DS14_v2" + STANDARD_DS14_V2_PROMO = "Standard_DS14_v2_Promo" + STANDARD_DS15_V2 = "Standard_DS15_v2" + STANDARD_DS1_V2 = "Standard_DS1_v2" + STANDARD_DS2 = "Standard_DS2" + STANDARD_DS2_V2 = "Standard_DS2_v2" + STANDARD_DS2_V2_PROMO = "Standard_DS2_v2_Promo" + STANDARD_DS3 = "Standard_DS3" + STANDARD_DS3_V2 = "Standard_DS3_v2" + STANDARD_DS3_V2_PROMO = "Standard_DS3_v2_Promo" + STANDARD_DS4 = "Standard_DS4" + STANDARD_DS4_V2 = "Standard_DS4_v2" + STANDARD_DS4_V2_PROMO = "Standard_DS4_v2_Promo" + STANDARD_DS5_V2 = "Standard_DS5_v2" + STANDARD_DS5_V2_PROMO = "Standard_DS5_v2_Promo" + STANDARD_E16_V3 = "Standard_E16_v3" + STANDARD_E16_S_V3 = "Standard_E16s_v3" + STANDARD_E2_V3 = "Standard_E2_v3" + STANDARD_E2_S_V3 = "Standard_E2s_v3" + STANDARD_E32_16_S_V3 = "Standard_E32-16s_v3" + STANDARD_E32_8_S_V3 = "Standard_E32-8s_v3" + STANDARD_E32_V3 = "Standard_E32_v3" + STANDARD_E32_S_V3 = "Standard_E32s_v3" + STANDARD_E4_V3 = "Standard_E4_v3" + STANDARD_E4_S_V3 = "Standard_E4s_v3" + STANDARD_E64_16_S_V3 = "Standard_E64-16s_v3" + STANDARD_E64_32_S_V3 = "Standard_E64-32s_v3" + STANDARD_E64_V3 = "Standard_E64_v3" + STANDARD_E64_S_V3 = "Standard_E64s_v3" + STANDARD_E8_V3 = "Standard_E8_v3" + STANDARD_E8_S_V3 = "Standard_E8s_v3" + STANDARD_F1 = "Standard_F1" + STANDARD_F16 = "Standard_F16" + STANDARD_F16_S = "Standard_F16s" + STANDARD_F16_S_V2 = "Standard_F16s_v2" + STANDARD_F1_S = "Standard_F1s" + STANDARD_F2 = "Standard_F2" + STANDARD_F2_S = "Standard_F2s" + STANDARD_F2_S_V2 = "Standard_F2s_v2" + STANDARD_F32_S_V2 = "Standard_F32s_v2" + STANDARD_F4 = "Standard_F4" + STANDARD_F4_S = "Standard_F4s" + STANDARD_F4_S_V2 = "Standard_F4s_v2" + STANDARD_F64_S_V2 = "Standard_F64s_v2" + STANDARD_F72_S_V2 = "Standard_F72s_v2" + STANDARD_F8 = "Standard_F8" + STANDARD_F8_S = "Standard_F8s" + STANDARD_F8_S_V2 = "Standard_F8s_v2" + STANDARD_G1 = "Standard_G1" + STANDARD_G2 = "Standard_G2" + STANDARD_G3 = "Standard_G3" + STANDARD_G4 = "Standard_G4" + STANDARD_G5 = "Standard_G5" + STANDARD_GS1 = "Standard_GS1" + STANDARD_GS2 = "Standard_GS2" + STANDARD_GS3 = "Standard_GS3" + STANDARD_GS4 = "Standard_GS4" + STANDARD_GS4_4 = "Standard_GS4-4" + STANDARD_GS4_8 = "Standard_GS4-8" + STANDARD_GS5 = "Standard_GS5" + STANDARD_GS5_16 = "Standard_GS5-16" + STANDARD_GS5_8 = "Standard_GS5-8" + STANDARD_H16 = "Standard_H16" + STANDARD_H16_M = "Standard_H16m" + STANDARD_H16_MR = "Standard_H16mr" + STANDARD_H16_R = "Standard_H16r" + STANDARD_H8 = "Standard_H8" + STANDARD_H8_M = "Standard_H8m" + STANDARD_L16_S = "Standard_L16s" + STANDARD_L32_S = "Standard_L32s" + STANDARD_L4_S = "Standard_L4s" + STANDARD_L8_S = "Standard_L8s" + STANDARD_M128_32_MS = "Standard_M128-32ms" + STANDARD_M128_64_MS = "Standard_M128-64ms" + STANDARD_M128_MS = "Standard_M128ms" + STANDARD_M128_S = "Standard_M128s" + STANDARD_M64_16_MS = "Standard_M64-16ms" + STANDARD_M64_32_MS = "Standard_M64-32ms" + STANDARD_M64_MS = "Standard_M64ms" + STANDARD_M64_S = "Standard_M64s" + STANDARD_NC12 = "Standard_NC12" + STANDARD_NC12_S_V2 = "Standard_NC12s_v2" + STANDARD_NC12_S_V3 = "Standard_NC12s_v3" + STANDARD_NC24 = "Standard_NC24" + STANDARD_NC24_R = "Standard_NC24r" + STANDARD_NC24_RS_V2 = "Standard_NC24rs_v2" + STANDARD_NC24_RS_V3 = "Standard_NC24rs_v3" + STANDARD_NC24_S_V2 = "Standard_NC24s_v2" + STANDARD_NC24_S_V3 = "Standard_NC24s_v3" + STANDARD_NC6 = "Standard_NC6" + STANDARD_NC6_S_V2 = "Standard_NC6s_v2" + STANDARD_NC6_S_V3 = "Standard_NC6s_v3" + STANDARD_ND12_S = "Standard_ND12s" + STANDARD_ND24_RS = "Standard_ND24rs" + STANDARD_ND24_S = "Standard_ND24s" + STANDARD_ND6_S = "Standard_ND6s" + STANDARD_NV12 = "Standard_NV12" + STANDARD_NV24 = "Standard_NV24" + STANDARD_NV6 = "Standard_NV6" + +class Count(with_metaclass(_CaseInsensitiveEnumMeta, int, Enum)): + """Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The + default value is 1. + """ + + ONE = 1 + THREE = 3 + FIVE = 5 + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class Expander(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + LEAST_WASTE = "least-waste" + MOST_PODS = "most-pods" + PRIORITY = "priority" + RANDOM = "random" + +class KubeletDiskType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """KubeletDiskType determines the placement of emptyDir volumes, container runtime data root, and + Kubelet ephemeral storage. Currently allows one value, OS, resulting in Kubelet using the OS + disk for data. + """ + + OS = "OS" + +class LicenseType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User + Benefits for Windows VMs. + """ + + NONE = "None" + WINDOWS_SERVER = "Windows_Server" + +class LoadBalancerSku(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The load balancer sku for the managed cluster. + """ + + STANDARD = "standard" + BASIC = "basic" + +class ManagedClusterPodIdentityProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state of the pod identity. + """ + + ASSIGNED = "Assigned" + UPDATING = "Updating" + DELETING = "Deleting" + FAILED = "Failed" + +class ManagedClusterSKUName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of a managed cluster SKU. + """ + + BASIC = "Basic" + +class ManagedClusterSKUTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tier of a managed cluster SKU. + """ + + PAID = "Paid" + FREE = "Free" + +class NetworkMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network mode used for building Kubernetes network. + """ + + TRANSPARENT = "transparent" + BRIDGE = "bridge" + +class NetworkPlugin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network plugin used for building Kubernetes network. + """ + + AZURE = "azure" + KUBENET = "kubenet" + +class NetworkPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network policy used for building Kubernetes network. + """ + + CALICO = "calico" + AZURE = "azure" + +class OSDiskType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """OSDiskType represents the type of an OS disk on an agent pool. + """ + + MANAGED = "Managed" + EPHEMERAL = "Ephemeral" - managed = "Managed" - ephemeral = "Ephemeral" +class OSType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + """ + LINUX = "Linux" + WINDOWS = "Windows" -class KubeletDiskType(str, Enum): +class OutboundType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The outbound (egress) routing method. + """ - os = "OS" + LOAD_BALANCER = "loadBalancer" + USER_DEFINED_ROUTING = "userDefinedRouting" +class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state. + """ -class OSType(str, Enum): + SUCCEEDED = "Succeeded" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" - linux = "Linux" - windows = "Windows" +class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly + created identity in master components and an auto-created user assigned identity in MC_ + resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, service + principal will be used instead. + """ + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + NONE = "None" -class AgentPoolType(str, Enum): +class ScaleSetEvictionPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale + set. Default to Delete. + """ - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" + DELETE = "Delete" + DEALLOCATE = "Deallocate" +class ScaleSetPriority(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. + """ -class AgentPoolMode(str, Enum): + SPOT = "Spot" + REGULAR = "Regular" - system = "System" - user = "User" +class UpgradeChannel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """upgrade channel for auto upgrade. + """ + RAPID = "rapid" + STABLE = "stable" + PATCH = "patch" + NONE = "none" -class Code(str, Enum): +class WeekDay(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The weekday enum. + """ - running = "Running" - stopped = "Stopped" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class LicenseType(str, Enum): - - none = "None" - windows_server = "Windows_Server" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class CreatedByType(str, Enum): - - user = "User" - application = "Application" - managed_identity = "ManagedIdentity" - key = "Key" - - -class WeekDay(str, Enum): - - sunday = "Sunday" - monday = "Monday" - tuesday = "Tuesday" - wednesday = "Wednesday" - thursday = "Thursday" - friday = "Friday" - saturday = "Saturday" - - -class ManagedClusterPodIdentityProvisioningState(str, Enum): - - assigned = "Assigned" - updating = "Updating" - deleting = "Deleting" - failed = "Failed" - - -class UpgradeChannel(str, Enum): - - rapid = "rapid" - stable = "stable" - patch = "patch" - none = "none" - - -class Expander(str, Enum): - - least_waste = "least-waste" - most_pods = "most-pods" - priority = "priority" - random = "random" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - none = "None" - - -class ManagedClusterSKUName(str, Enum): - - basic = "Basic" - - -class ManagedClusterSKUTier(str, Enum): - - paid = "Paid" - free = "Free" - - -class PrivateEndpointConnectionProvisioningState(str, Enum): - - succeeded = "Succeeded" - creating = "Creating" - deleting = "Deleting" - failed = "Failed" - - -class ConnectionStatus(str, Enum): - - pending = "Pending" - approved = "Approved" - rejected = "Rejected" - disconnected = "Disconnected" + SUNDAY = "Sunday" + MONDAY = "Monday" + TUESDAY = "Tuesday" + WEDNESDAY = "Wednesday" + THURSDAY = "Thursday" + FRIDAY = "Friday" + SATURDAY = "Saturday" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_models.py old mode 100644 new mode 100755 index 4637d82548b..27b37a8358b --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_models.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_models.py @@ -1,30 +1,25 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError +import msrest.serialization -class SubResource(Model): +class SubResource(msrest.serialization.Model): """Reference to another subresource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str """ @@ -40,7 +35,10 @@ class SubResource(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SubResource, self).__init__(**kwargs) self.id = None self.name = None @@ -50,172 +48,143 @@ def __init__(self, **kwargs): class AgentPool(SubResource): """Agent Pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for + system pools. The default value is 1. :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or + :param type_properties_type: AgentPoolType represents types of an agent pool. Possible values + include: "VirtualMachineScaleSets", "AvailabilitySet". + :type type_properties_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_12_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool """ @@ -223,6 +192,7 @@ class AgentPool(SubResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -244,7 +214,7 @@ class AgentPool(SubResource): 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, 'min_count': {'key': 'properties.minCount', 'type': 'int'}, 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, 'mode': {'key': 'properties.mode', 'type': 'str'}, 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, @@ -265,7 +235,10 @@ class AgentPool(SubResource): 'enable_encryption_at_host': {'key': 'properties.enableEncryptionAtHost', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPool, self).__init__(**kwargs) self.count = kwargs.get('count', None) self.vm_size = kwargs.get('vm_size', None) @@ -279,7 +252,7 @@ def __init__(self, **kwargs): self.max_count = kwargs.get('max_count', None) self.min_count = kwargs.get('min_count', None) self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) + self.type_properties_type = kwargs.get('type_properties_type', None) self.mode = kwargs.get('mode', None) self.orchestrator_version = kwargs.get('orchestrator_version', None) self.node_image_version = None @@ -290,7 +263,7 @@ def __init__(self, **kwargs): self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) + self.spot_max_price = kwargs.get('spot_max_price', -1) self.tags = kwargs.get('tags', None) self.node_labels = kwargs.get('node_labels', None) self.node_taints = kwargs.get('node_taints', None) @@ -300,11 +273,10 @@ def __init__(self, **kwargs): self.enable_encryption_at_host = kwargs.get('enable_encryption_at_host', None) -class AgentPoolAvailableVersions(Model): +class AgentPoolAvailableVersions(msrest.serialization.Model): """The list of available versions for an agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Id of the agent pool available versions. :vartype id: str @@ -330,7 +302,10 @@ class AgentPoolAvailableVersions(Model): 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolAvailableVersions, self).__init__(**kwargs) self.id = None self.name = None @@ -338,7 +313,7 @@ def __init__(self, **kwargs): self.agent_pool_versions = kwargs.get('agent_pool_versions', None) -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): +class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(msrest.serialization.Model): """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. :param default: Whether this version is the default agent pool version. @@ -355,18 +330,49 @@ class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) self.default = kwargs.get('default', None) self.kubernetes_version = kwargs.get('kubernetes_version', None) self.is_preview = kwargs.get('is_preview', None) -class AgentPoolUpgradeProfile(Model): +class AgentPoolListResult(msrest.serialization.Model): + """The response from the List Agent Pools operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of agent pools. + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool] + :ivar next_link: The URL to get the next set of agent pool results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AgentPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPoolListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class AgentPoolUpgradeProfile(msrest.serialization.Model): """The list of available upgrades for an agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -376,20 +382,16 @@ class AgentPoolUpgradeProfile(Model): :vartype name: str :ivar type: Type of the agent pool upgrade profile. :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. :type upgrades: list[~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. + :param latest_node_image_version: LatestNodeImageVersion is the latest AKS supported node image + version. :type latest_node_image_version: str """ @@ -411,18 +413,21 @@ class AgentPoolUpgradeProfile(Model): 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolUpgradeProfile, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.kubernetes_version = kwargs['kubernetes_version'] self.os_type = kwargs.get('os_type', "Linux") self.upgrades = kwargs.get('upgrades', None) self.latest_node_image_version = kwargs.get('latest_node_image_version', None) -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): +class AgentPoolUpgradeProfilePropertiesUpgradesItem(msrest.serialization.Model): """AgentPoolUpgradeProfilePropertiesUpgradesItem. :param kubernetes_version: Kubernetes version (major, minor, patch). @@ -436,17 +441,20 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) self.kubernetes_version = kwargs.get('kubernetes_version', None) self.is_preview = kwargs.get('is_preview', None) -class AgentPoolUpgradeSettings(Model): +class AgentPoolUpgradeSettings(msrest.serialization.Model): """Settings for upgrading an agentpool. - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default + :param max_surge: Count or percentage of additional nodes to be added during upgrade. If empty + uses AKS default. :type max_surge: str """ @@ -454,55 +462,47 @@ class AgentPoolUpgradeSettings(Model): 'max_surge': {'key': 'maxSurge', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolUpgradeSettings, self).__init__(**kwargs) self.max_surge = kwargs.get('max_surge', None) -class CloudError(Model): +class CloudError(msrest.serialization.Model): """An error response from the Container service. :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_12_01.models.CloudErrorBody + :type error: ~azure.mgmt.containerservice.v2020_12_01.models.CloudErrorBody """ _attribute_map = { 'error': {'key': 'error', 'type': 'CloudErrorBody'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CloudError, self).__init__(**kwargs) self.error = kwargs.get('error', None) -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): +class CloudErrorBody(msrest.serialization.Model): """An error response from the Container service. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: A message describing the error, intended to be suitable for display in a user + interface. :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. + :param target: The target of the particular error. For example, the name of the property in + error. :type target: str :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_12_01.models.CloudErrorBody] + :type details: list[~azure.mgmt.containerservice.v2020_12_01.models.CloudErrorBody] """ _attribute_map = { @@ -512,7 +512,10 @@ class CloudErrorBody(Model): 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CloudErrorBody, self).__init__(**kwargs) self.code = kwargs.get('code', None) self.message = kwargs.get('message', None) @@ -520,13 +523,230 @@ def __init__(self, **kwargs): self.details = kwargs.get('details', None) -class ContainerServiceDiagnosticsProfile(Model): +class Components1Q1Og48SchemasManagedclusterAllof1(msrest.serialization.Model): + """Components1Q1Og48SchemasManagedclusterAllof1. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. + :type kubernetes_version: str + :param dns_prefix: DNS prefix specified when creating the managed cluster. + :type dns_prefix: str + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + :ivar private_fqdn: FQDN of private cluster. + :vartype private_fqdn: str + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAgentPoolProfile] + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceLinuxProfile + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterWindowsProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterServicePrincipalProfile + :param addon_profiles: Profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAddonProfile] + :param pod_identity_profile: Profile of managed cluster pod identity. + :type pod_identity_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentityProfile + :param node_resource_group: Name of the resource group containing agent pool nodes. + :type node_resource_group: str + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :type enable_rbac: bool + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. + :type enable_pod_security_policy: bool + :param network_profile: Profile of network configuration. + :type network_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceNetworkProfile + :param aad_profile: Profile of Azure Active Directory configuration. + :type aad_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile + :param auto_upgrade_profile: Profile of auto upgrade configuration. + :type auto_upgrade_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAutoUpgradeProfile + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. + :type auto_scaler_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPropertiesAutoScalerProfile + :param api_server_access_profile: Access profile for managed cluster API server. + :type api_server_access_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAPIServerAccessProfile + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. + :type disk_encryption_set_id: str + :param identity_profile: Identities associated with the cluster. + :type identity_profile: dict[str, + ~azure.mgmt.containerservice.v2020_12_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + 'max_agent_pools': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'private_fqdn': {'readonly': True}, + } + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, + 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, + 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, + 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, + 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, + 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Q1Og48SchemasManagedclusterAllof1, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.provisioning_state = None + self.power_state = None + self.max_agent_pools = None + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.dns_prefix = kwargs.get('dns_prefix', None) + self.fqdn = None + self.private_fqdn = None + self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) + self.linux_profile = kwargs.get('linux_profile', None) + self.windows_profile = kwargs.get('windows_profile', None) + self.service_principal_profile = kwargs.get('service_principal_profile', None) + self.addon_profiles = kwargs.get('addon_profiles', None) + self.pod_identity_profile = kwargs.get('pod_identity_profile', None) + self.node_resource_group = kwargs.get('node_resource_group', None) + self.enable_rbac = kwargs.get('enable_rbac', None) + self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) + self.network_profile = kwargs.get('network_profile', None) + self.aad_profile = kwargs.get('aad_profile', None) + self.auto_upgrade_profile = kwargs.get('auto_upgrade_profile', None) + self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) + self.api_server_access_profile = kwargs.get('api_server_access_profile', None) + self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) + self.identity_profile = kwargs.get('identity_profile', None) + + +class Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedIdentity(msrest.serialization.Model): + """UserAssignedIdentity. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.client_id = kwargs.get('client_id', None) + self.object_id = kwargs.get('object_id', None) + + +class ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties(UserAssignedIdentity): + """ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties, self).__init__(**kwargs) + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): """Profile for diagnostics on the container service cluster. All required parameters must be populated in order to send to Azure. - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. :type vm_diagnostics: ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMDiagnostics """ @@ -539,23 +759,23 @@ class ContainerServiceDiagnosticsProfile(Model): 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) + self.vm_diagnostics = kwargs['vm_diagnostics'] -class ContainerServiceLinuxProfile(Model): +class ContainerServiceLinuxProfile(msrest.serialization.Model): """Profile for Linux VMs in the container service cluster. All required parameters must be populated in order to send to Azure. - :param admin_username: Required. The administrator username to use for - Linux VMs. + :param admin_username: Required. The administrator username to use for Linux VMs. :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceSshConfiguration + :param ssh: Required. SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceSshConfiguration """ _validation = { @@ -568,93 +788,79 @@ class ContainerServiceLinuxProfile(Model): 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) + self.admin_username = kwargs['admin_username'] + self.ssh = kwargs['ssh'] -class ContainerServiceMasterProfile(Model): +class ContainerServiceMasterProfile(msrest.serialization.Model): """Profile for the container service master. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. + :param count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2020_12_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". :type storage_profile: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceStorageProfileTypes :ivar fqdn: FQDN for the master pool. @@ -664,6 +870,7 @@ class ContainerServiceMasterProfile(Model): _validation = { 'dns_prefix': {'required': True}, 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, 'fqdn': {'readonly': True}, } @@ -678,11 +885,14 @@ class ContainerServiceMasterProfile(Model): 'fqdn': {'key': 'fqdn', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) + self.count = kwargs.get('count', "1") + self.dns_prefix = kwargs['dns_prefix'] + self.vm_size = kwargs['vm_size'] self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") @@ -690,46 +900,35 @@ def __init__(self, **kwargs): self.fqdn = None -class ContainerServiceNetworkProfile(Model): +class ContainerServiceNetworkProfile(msrest.serialization.Model): """Profile of network configuration. - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_12_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_12_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_12_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . + :param network_plugin: Network plugin used for building Kubernetes network. Possible values + include: "azure", "kubenet". Default value: "kubenet". + :type network_plugin: str or ~azure.mgmt.containerservice.v2020_12_01.models.NetworkPlugin + :param network_policy: Network policy used for building Kubernetes network. Possible values + include: "calico", "azure". + :type network_policy: str or ~azure.mgmt.containerservice.v2020_12_01.models.NetworkPolicy + :param network_mode: Network mode used for building Kubernetes network. Possible values + include: "transparent", "bridge". + :type network_mode: str or ~azure.mgmt.containerservice.v2020_12_01.models.NetworkMode + :param pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . + :param service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . + :param dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_12_01.models.LoadBalancerSku + :param outbound_type: The outbound (egress) routing method. Possible values include: + "loadBalancer", "userDefinedRouting". Default value: "loadBalancer". + :type outbound_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OutboundType + :param load_balancer_sku: The load balancer sku for the managed cluster. Possible values + include: "standard", "basic". + :type load_balancer_sku: str or ~azure.mgmt.containerservice.v2020_12_01.models.LoadBalancerSku :param load_balancer_profile: Profile of the cluster load balancer. :type load_balancer_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterLoadBalancerProfile @@ -755,7 +954,10 @@ class ContainerServiceNetworkProfile(Model): 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceNetworkProfile, self).__init__(**kwargs) self.network_plugin = kwargs.get('network_plugin', "kubenet") self.network_policy = kwargs.get('network_policy', None) @@ -769,13 +971,13 @@ def __init__(self, **kwargs): self.load_balancer_profile = kwargs.get('load_balancer_profile', None) -class ContainerServiceSshConfiguration(Model): +class ContainerServiceSshConfiguration(msrest.serialization.Model): """SSH configuration for Linux-based VMs running on Azure. All required parameters must be populated in order to send to Azure. - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. Only expect one key specified. :type public_keys: list[~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceSshPublicKey] """ @@ -788,19 +990,21 @@ class ContainerServiceSshConfiguration(Model): 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) + self.public_keys = kwargs['public_keys'] -class ContainerServiceSshPublicKey(Model): +class ContainerServiceSshPublicKey(msrest.serialization.Model): """Contains information about SSH certificate public key data. All required parameters must be populated in order to send to Azure. - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. :type key_data: str """ @@ -812,24 +1016,24 @@ class ContainerServiceSshPublicKey(Model): 'key_data': {'key': 'keyData', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) + self.key_data = kwargs['key_data'] -class ContainerServiceVMDiagnostics(Model): +class ContainerServiceVMDiagnostics(msrest.serialization.Model): """Profile for diagnostics on the container service VMs. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. + :param enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. + :ivar storage_uri: The URI of the storage account where diagnostics are stored. :vartype storage_uri: str """ @@ -843,17 +1047,19 @@ class ContainerServiceVMDiagnostics(Model): 'storage_uri': {'key': 'storageUri', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) + self.enabled = kwargs['enabled'] self.storage_uri = None -class CredentialResult(Model): +class CredentialResult(msrest.serialization.Model): """The credential result response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar name: The name of the credential. :vartype name: str @@ -871,21 +1077,22 @@ class CredentialResult(Model): 'value': {'key': 'value', 'type': 'bytearray'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CredentialResult, self).__init__(**kwargs) self.name = None self.value = None -class CredentialResults(Model): +class CredentialResults(msrest.serialization.Model): """The list of credential result response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_12_01.models.CredentialResult] + :vartype kubeconfigs: list[~azure.mgmt.containerservice.v2020_12_01.models.CredentialResult] """ _validation = { @@ -896,40 +1103,42 @@ class CredentialResults(Model): 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CredentialResults, self).__init__(**kwargs) self.kubeconfigs = None -class KubeletConfig(Model): +class KubeletConfig(msrest.serialization.Model): """Kubelet configurations of agent nodes. :param cpu_manager_policy: CPU Manager policy to use. :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. + :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that specify CPU limits. :type cpu_cfs_quota: bool :param cpu_cfs_quota_period: Sets CPU CFS quota period value. :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. + :param image_gc_high_threshold: The percent of disk usage after which image garbage collection + is always run. :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. + :param image_gc_low_threshold: The percent of disk usage before which image garbage collection + is never run. :type image_gc_low_threshold: int :param topology_manager_policy: Topology Manager policy to use. :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). + :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe sysctl patterns (ending in + ``*``\ ). :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. + :param fail_swap_on: If set to true it will make the Kubelet fail to start if swap is enabled + on the node. :type fail_swap_on: bool - :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of - container log file before it is rotated. + :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of container log file before it + is rotated. :type container_log_max_size_mb: int - :param container_log_max_files: The maximum number of container log files - that can be present for a container. The number must be ≥ 2. + :param container_log_max_files: The maximum number of container log files that can be present + for a container. The number must be ≥ 2. :type container_log_max_files: int :param pod_max_pids: The maximum number of processes per pod. :type pod_max_pids: int @@ -953,7 +1162,10 @@ class KubeletConfig(Model): 'pod_max_pids': {'key': 'podMaxPids', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(KubeletConfig, self).__init__(**kwargs) self.cpu_manager_policy = kwargs.get('cpu_manager_policy', None) self.cpu_cfs_quota = kwargs.get('cpu_cfs_quota', None) @@ -968,20 +1180,17 @@ def __init__(self, **kwargs): self.pod_max_pids = kwargs.get('pod_max_pids', None) -class LinuxOSConfig(Model): +class LinuxOSConfig(msrest.serialization.Model): """OS configurations of Linux agent nodes. :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2020_12_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. + :type sysctls: ~azure.mgmt.containerservice.v2020_12_01.models.SysctlConfig + :param transparent_huge_page_enabled: Transparent Huge Page enabled configuration. :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. + :param transparent_huge_page_defrag: Transparent Huge Page defrag configuration. :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. + :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap file will be created on + each node. :type swap_file_size_mb: int """ @@ -992,7 +1201,10 @@ class LinuxOSConfig(Model): 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(LinuxOSConfig, self).__init__(**kwargs) self.sysctls = kwargs.get('sysctls', None) self.transparent_huge_page_enabled = kwargs.get('transparent_huge_page_enabled', None) @@ -1003,25 +1215,21 @@ def __init__(self, **kwargs): class MaintenanceConfiguration(SubResource): """maintenance configuration. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str :ivar system_data: The system meta data relating to this resource. - :vartype system_data: - ~azure.mgmt.containerservice.v2020_12_01.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2020_12_01.models.SystemData :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2020_12_01.models.TimeInWeek] + :type time_in_week: list[~azure.mgmt.containerservice.v2020_12_01.models.TimeInWeek] :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2020_12_01.models.TimeSpan] + :type not_allowed_time: list[~azure.mgmt.containerservice.v2020_12_01.models.TimeSpan] """ _validation = { @@ -1040,30 +1248,61 @@ class MaintenanceConfiguration(SubResource): 'not_allowed_time': {'key': 'properties.notAllowedTime', 'type': '[TimeSpan]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(MaintenanceConfiguration, self).__init__(**kwargs) self.system_data = None self.time_in_week = kwargs.get('time_in_week', None) self.not_allowed_time = kwargs.get('not_allowed_time', None) -class Resource(Model): +class MaintenanceConfigurationListResult(msrest.serialization.Model): + """The response from the List maintenance configurations operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of maintenance configurations. + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration] + :ivar next_link: The URL to get the next set of maintenance configuration results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MaintenanceConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MaintenanceConfigurationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class Resource(msrest.serialization.Model): """The Resource model definition. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id + :ivar id: Resource Id. :vartype id: str - :ivar name: Resource name + :ivar name: Resource name. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param location: Required. Resource location + :param location: Required. Resource location. :type location: str - :param tags: Resource tags + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -1082,44 +1321,35 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = kwargs.get('location', None) + self.location = kwargs['location'] self.tags = kwargs.get('tags', None) -class ManagedCluster(Resource): +class ManagedCluster(Resource, Components1Q1Og48SchemasManagedclusterAllof1): """Managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2020_12_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. :type kubernetes_version: str :param dns_prefix: DNS prefix specified when creating the managed cluster. :type dns_prefix: str @@ -1130,16 +1360,14 @@ class ManagedCluster(Resource): :param agent_pool_profiles: Properties of the agent pool. :type agent_pool_profiles: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. + :param linux_profile: Profile for Linux VMs in the container service cluster. :type linux_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. + :param windows_profile: Profile for Windows VMs in the container service cluster. :type windows_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. :type service_principal_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterServicePrincipalProfile :param addon_profiles: Profile of managed cluster add-on. @@ -1148,65 +1376,62 @@ class ManagedCluster(Resource): :param pod_identity_profile: Profile of managed cluster pod identity. :type pod_identity_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. + :param node_resource_group: Name of the resource group containing agent pool nodes. :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. :type enable_pod_security_policy: bool :param network_profile: Profile of network configuration. :type network_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceNetworkProfile :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile + :type aad_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile :param auto_upgrade_profile: Profile of auto upgrade configuration. :type auto_upgrade_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. :type auto_scaler_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. + :param api_server_access_profile: Access profile for managed cluster API server. :type api_server_access_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. :type disk_encryption_set_id: str :param identity_profile: Identities associated with the cluster. :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterIdentity + ~azure.mgmt.containerservice.v2020_12_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKU + :type sku: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKU """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, 'max_agent_pools': {'readonly': True}, 'fqdn': {'readonly': True}, 'private_fqdn': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, @@ -1229,13 +1454,21 @@ class ManagedCluster(Resource): 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedCluster, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) self.provisioning_state = None self.power_state = None self.max_agent_pools = None @@ -1259,47 +1492,53 @@ def __init__(self, **kwargs): self.api_server_access_profile = kwargs.get('api_server_access_profile', None) self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) self.identity_profile = kwargs.get('identity_profile', None) - self.identity = kwargs.get('identity', None) + self.sku = kwargs.get('sku', None) + self.id = None + self.name = None + self.type = None + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) self.sku = kwargs.get('sku', None) -class ManagedClusterAADProfile(Model): +class ManagedClusterAADProfile(msrest.serialization.Model): """AADProfile specifies attributes for Azure Active Directory integration. :param managed: Whether to enable managed AAD. :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. + :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes authorization. :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] + :param admin_group_object_i_ds: AAD group object IDs that will have admin role of the cluster. + :type admin_group_object_i_ds: list[str] :param client_app_id: The client AAD application ID. :type client_app_id: str :param server_app_id: The server AAD application ID. :type server_app_id: str :param server_app_secret: The server AAD application secret. :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. + :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. :type tenant_id: str """ _attribute_map = { 'managed': {'key': 'managed', 'type': 'bool'}, 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, + 'admin_group_object_i_ds': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, 'tenant_id': {'key': 'tenantID', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAADProfile, self).__init__(**kwargs) self.managed = kwargs.get('managed', None) self.enable_azure_rbac = kwargs.get('enable_azure_rbac', None) - self.admin_group_object_ids = kwargs.get('admin_group_object_ids', None) + self.admin_group_object_i_ds = kwargs.get('admin_group_object_i_ds', None) self.client_app_id = kwargs.get('client_app_id', None) self.server_app_id = kwargs.get('server_app_id', None) self.server_app_secret = kwargs.get('server_app_secret', None) @@ -1309,20 +1548,19 @@ def __init__(self, **kwargs): class ManagedClusterAccessProfile(Resource): """Managed cluster Access Profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id + :ivar id: Resource Id. :vartype id: str - :ivar name: Resource name + :ivar name: Resource name. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param location: Required. Resource location + :param location: Required. Resource location. :type location: str - :param tags: Resource tags + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param kube_config: Base64-encoded Kubernetes configuration file. :type kube_config: bytearray @@ -1344,16 +1582,18 @@ class ManagedClusterAccessProfile(Resource): 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAccessProfile, self).__init__(**kwargs) self.kube_config = kwargs.get('kube_config', None) -class ManagedClusterAddonProfile(Model): +class ManagedClusterAddonProfile(msrest.serialization.Model): """A Kubernetes add-on profile for a managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -1377,37 +1617,16 @@ class ManagedClusterAddonProfile(Model): 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) + self.enabled = kwargs['enabled'] self.config = kwargs.get('config', None) self.identity = None -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): """Information of user assigned identity used by this add-on. @@ -1425,176 +1644,150 @@ class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): 'object_id': {'key': 'objectId', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) -class ManagedClusterAgentPoolProfileProperties(Model): +class ManagedClusterAgentPoolProfileProperties(msrest.serialization.Model): """Properties for the container service agent pool profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for + system pools. The default value is 1. :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_12_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool """ _validation = { + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -1634,7 +1827,10 @@ class ManagedClusterAgentPoolProfileProperties(Model): 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) self.count = kwargs.get('count', None) self.vm_size = kwargs.get('vm_size', None) @@ -1659,7 +1855,7 @@ def __init__(self, **kwargs): self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) + self.spot_max_price = kwargs.get('spot_max_price', -1) self.tags = kwargs.get('tags', None) self.node_labels = kwargs.get('node_labels', None) self.node_taints = kwargs.get('node_taints', None) @@ -1672,174 +1868,145 @@ def __init__(self, **kwargs): class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): """Profile for the container service agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for + system pools. The default value is 1. :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_12_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. + :param name: Required. Unique name of the agent pool profile in the context of the subscription + and resource group. :type name: str """ _validation = { + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -1881,19 +2048,20 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): 'name': {'key': 'name', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) + self.name = kwargs['name'] -class ManagedClusterAPIServerAccessProfile(Model): +class ManagedClusterAPIServerAccessProfile(msrest.serialization.Model): """Access profile for managed cluster API server. - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. + :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. + :param enable_private_cluster: Whether to create the cluster as a private cluster or not. :type enable_private_cluster: bool :param private_dns_zone: Private dns zone mode for private cluster. :type private_dns_zone: str @@ -1905,58 +2073,59 @@ class ManagedClusterAPIServerAccessProfile(Model): 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) self.enable_private_cluster = kwargs.get('enable_private_cluster', None) self.private_dns_zone = kwargs.get('private_dns_zone', None) -class ManagedClusterAutoUpgradeProfile(Model): +class ManagedClusterAutoUpgradeProfile(msrest.serialization.Model): """Auto upgrade profile for a managed cluster. - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2020_12_01.models.UpgradeChannel + :param upgrade_channel: upgrade channel for auto upgrade. Possible values include: "rapid", + "stable", "patch", "none". + :type upgrade_channel: str or ~azure.mgmt.containerservice.v2020_12_01.models.UpgradeChannel """ _attribute_map = { 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) self.upgrade_channel = kwargs.get('upgrade_channel', None) -class ManagedClusterIdentity(Model): +class ManagedClusterIdentity(msrest.serialization.Model): """Identity for the managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. + :ivar principal_id: The principal id of the system assigned identity which is used by master + components. :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. + :ivar tenant_id: The tenant id of the system assigned identity which is used by master + components. :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: + :param type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use + an implicitly created identity in master components and an auto-created user assigned identity + in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, + service principal will be used instead. Possible values include: "SystemAssigned", + "UserAssigned", "None". + :type type: str or ~azure.mgmt.containerservice.v2020_12_01.models.ResourceIdentityType + :param user_assigned_identities: The user identity associated with the managed cluster. This + identity will be used in control plane and only one user assigned identity is allowed. The user + identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] + ~azure.mgmt.containerservice.v2020_12_01.models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties] """ _validation = { @@ -1967,11 +2136,14 @@ class ManagedClusterIdentity(Model): _attribute_map = { 'principal_id': {'key': 'principalId', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None @@ -1979,61 +2151,58 @@ def __init__(self, **kwargs): self.user_assigned_identities = kwargs.get('user_assigned_identities', None) -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. +class ManagedClusterListResult(msrest.serialization.Model): + """The response from the List Managed Clusters operation. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str + :param value: The list of managed clusters. + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] + :ivar next_link: The URL to get the next set of managed cluster results. + :vartype next_link: str """ _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, + 'next_link': {'readonly': True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ManagedCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, **kwargs): - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None + def __init__( + self, + **kwargs + ): + super(ManagedClusterListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None -class ManagedClusterLoadBalancerProfile(Model): +class ManagedClusterLoadBalancerProfile(msrest.serialization.Model): """Profile of the managed cluster load balancer. - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: + :param managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. + :type managed_outbound_i_ps: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. + :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the cluster load + balancer. :type outbound_ip_prefixes: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: + :param outbound_i_ps: Desired outbound IP resources for the cluster load balancer. + :type outbound_i_ps: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: + :param effective_outbound_i_ps: The effective outbound IP resources of the cluster load + balancer. + :type effective_outbound_i_ps: list[~azure.mgmt.containerservice.v2020_12_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . + :param allocated_outbound_ports: Desired number of allocated SNAT ports per VM. Allowed values + must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure + dynamically allocating ports. :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . + :param idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + must be in the range of 4 to 120 (inclusive). The default value is 30 minutes. :type idle_timeout_in_minutes: int """ @@ -2043,30 +2212,32 @@ class ManagedClusterLoadBalancerProfile(Model): } _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, + 'managed_outbound_i_ps': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, + 'outbound_i_ps': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, + 'effective_outbound_i_ps': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) + self.managed_outbound_i_ps = kwargs.get('managed_outbound_i_ps', None) self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) + self.outbound_i_ps = kwargs.get('outbound_i_ps', None) + self.effective_outbound_i_ps = kwargs.get('effective_outbound_i_ps', None) self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): +class ManagedClusterLoadBalancerProfileManagedOutboundIPs(msrest.serialization.Model): """Desired managed outbound IPs for the cluster load balancer. - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . + :param count: Desired number of outbound IP created/managed by Azure for the cluster load + balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. :type count: int """ @@ -2078,12 +2249,15 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): 'count': {'key': 'count', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) self.count = kwargs.get('count', 1) -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): +class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(msrest.serialization.Model): """Desired outbound IP Prefix resources for the cluster load balancer. :param public_ip_prefixes: A list of public IP prefix resources. @@ -2095,33 +2269,37 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): +class ManagedClusterLoadBalancerProfileOutboundIPs(msrest.serialization.Model): """Desired outbound IP resources for the cluster load balancer. - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_12_01.models.ResourceReference] + :param public_i_ps: A list of public IP resources. + :type public_i_ps: list[~azure.mgmt.containerservice.v2020_12_01.models.ResourceReference] """ _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, + 'public_i_ps': {'key': 'publicIPs', 'type': '[ResourceReference]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) + self.public_i_ps = kwargs.get('public_i_ps', None) -class ManagedClusterPodIdentity(Model): +class ManagedClusterPodIdentity(msrest.serialization.Model): """ManagedClusterPodIdentity. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2130,11 +2308,9 @@ class ManagedClusterPodIdentity(Model): :param namespace: Required. Namespace of the pod identity. :type namespace: str :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2020_12_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' + :type identity: ~azure.mgmt.containerservice.v2020_12_01.models.UserAssignedIdentity + :ivar provisioning_state: The current provisioning state of the pod identity. Possible values + include: "Assigned", "Updating", "Deleting", "Failed". :vartype provisioning_state: str or ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentityProvisioningState :ivar provisioning_info: @@ -2158,16 +2334,19 @@ class ManagedClusterPodIdentity(Model): 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPodIdentity, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.identity = kwargs.get('identity', None) + self.name = kwargs['name'] + self.namespace = kwargs['namespace'] + self.identity = kwargs['identity'] self.provisioning_state = None self.provisioning_info = None -class ManagedClusterPodIdentityException(Model): +class ManagedClusterPodIdentityException(msrest.serialization.Model): """ManagedClusterPodIdentityException. All required parameters must be populated in order to send to Azure. @@ -2192,14 +2371,17 @@ class ManagedClusterPodIdentityException(Model): 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPodIdentityException, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.pod_labels = kwargs.get('pod_labels', None) + self.name = kwargs['name'] + self.namespace = kwargs['namespace'] + self.pod_labels = kwargs['pod_labels'] -class ManagedClusterPodIdentityProfile(Model): +class ManagedClusterPodIdentityProfile(msrest.serialization.Model): """ManagedClusterPodIdentityProfile. :param enabled: Whether the pod identity addon is enabled. @@ -2207,8 +2389,7 @@ class ManagedClusterPodIdentityProfile(Model): :param user_assigned_identities: User assigned pod identity settings. :type user_assigned_identities: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. + :param user_assigned_identity_exceptions: User assigned pod identity exception settings. :type user_assigned_identity_exceptions: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentityException] """ @@ -2219,14 +2400,17 @@ class ManagedClusterPodIdentityProfile(Model): 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) self.enabled = kwargs.get('enabled', None) self.user_assigned_identities = kwargs.get('user_assigned_identities', None) self.user_assigned_identity_exceptions = kwargs.get('user_assigned_identity_exceptions', None) -class ManagedClusterPodIdentityProvisioningInfo(Model): +class ManagedClusterPodIdentityProvisioningInfo(msrest.serialization.Model): """ManagedClusterPodIdentityProvisioningInfo. :param error: Pod identity assignment error (if any). @@ -2237,28 +2421,27 @@ class ManagedClusterPodIdentityProvisioningInfo(Model): 'error': {'key': 'error', 'type': 'CloudError'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) self.error = kwargs.get('error', None) -class ManagedClusterPoolUpgradeProfile(Model): +class ManagedClusterPoolUpgradeProfile(msrest.serialization.Model): """The list of available upgrade versions. All required parameters must be populated in order to send to Azure. - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). :type kubernetes_version: str :param name: Pool name. :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. :type upgrades: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] """ @@ -2275,15 +2458,18 @@ class ManagedClusterPoolUpgradeProfile(Model): 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.kubernetes_version = kwargs['kubernetes_version'] self.name = kwargs.get('name', None) self.os_type = kwargs.get('os_type', "Linux") self.upgrades = kwargs.get('upgrades', None) -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): +class ManagedClusterPoolUpgradeProfileUpgradesItem(msrest.serialization.Model): """ManagedClusterPoolUpgradeProfileUpgradesItem. :param kubernetes_version: Kubernetes version (major, minor, patch). @@ -2297,21 +2483,22 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) self.kubernetes_version = kwargs.get('kubernetes_version', None) self.is_preview = kwargs.get('is_preview', None) -class ManagedClusterPropertiesAutoScalerProfile(Model): +class ManagedClusterPropertiesAutoScalerProfile(msrest.serialization.Model): """Parameters to be applied to the cluster-autoscaler when enabled. :param balance_similar_node_groups: :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'priority', 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2020_12_01.models.Expander + :param expander: Possible values include: "least-waste", "most-pods", "priority", "random". + :type expander: str or ~azure.mgmt.containerservice.v2020_12_01.models.Expander :param max_empty_bulk_delete: :type max_empty_bulk_delete: str :param max_graceful_termination_sec: @@ -2364,7 +2551,10 @@ class ManagedClusterPropertiesAutoScalerProfile(Model): 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) self.expander = kwargs.get('expander', None) @@ -2385,37 +2575,14 @@ def __init__(self, **kwargs): self.skip_nodes_with_system_pods = kwargs.get('skip_nodes_with_system_pods', None) -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. +class ManagedClusterServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. All required parameters must be populated in order to send to Azure. :param client_id: Required. The ID for the service principal. :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. + :param secret: The secret password associated with the service principal in plain text. :type secret: str """ @@ -2428,23 +2595,22 @@ class ManagedClusterServicePrincipalProfile(Model): 'secret': {'key': 'secret', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) + self.client_id = kwargs['client_id'] self.secret = kwargs.get('secret', None) -class ManagedClusterSKU(Model): +class ManagedClusterSKU(msrest.serialization.Model): """ManagedClusterSKU. - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKUTier + :param name: Name of a managed cluster SKU. Possible values include: "Basic". + :type name: str or ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKUName + :param tier: Tier of a managed cluster SKU. Possible values include: "Paid", "Free". + :type tier: str or ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKUTier """ _attribute_map = { @@ -2452,17 +2618,19 @@ class ManagedClusterSKU(Model): 'tier': {'key': 'tier', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterSKU, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.tier = kwargs.get('tier', None) -class ManagedClusterUpgradeProfile(Model): +class ManagedClusterUpgradeProfile(msrest.serialization.Model): """The list of available upgrades for compute pools. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2472,12 +2640,11 @@ class ManagedClusterUpgradeProfile(Model): :vartype name: str :ivar type: Type of upgrade profile. :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. + :param control_plane_profile: Required. The list of available upgrade versions for the control + plane. :type control_plane_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. + :param agent_pool_profiles: Required. The list of available upgrade versions for agent pools. :type agent_pool_profiles: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPoolUpgradeProfile] """ @@ -2498,43 +2665,42 @@ class ManagedClusterUpgradeProfile(Model): 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) + self.control_plane_profile = kwargs['control_plane_profile'] + self.agent_pool_profiles = kwargs['agent_pool_profiles'] -class ManagedClusterWindowsProfile(Model): +class ManagedClusterWindowsProfile(msrest.serialization.Model): """Profile for Windows VMs in the container service cluster. All required parameters must be populated in order to send to Azure. - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters + :param admin_username: Required. Specifies the name of the administrator account. + :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", + "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", + "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + "sys", "test2", "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 + character :code:`
`:code:`
` **Max-length:** 20 characters. :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" + :param admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` + **Max-length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.LicenseType + :param license_type: The licenseType to use for Windows VMs. Windows_Server is used to enable + Azure Hybrid User Benefits for Windows VMs. Possible values include: "None", "Windows_Server". + :type license_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.LicenseType """ _validation = { @@ -2547,18 +2713,45 @@ class ManagedClusterWindowsProfile(Model): 'license_type': {'key': 'licenseType', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) + self.admin_username = kwargs['admin_username'] self.admin_password = kwargs.get('admin_password', None) self.license_type = kwargs.get('license_type', None) -class OperationValue(Model): +class OperationListResult(msrest.serialization.Model): + """The List Compute Operation operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of compute operations. + :vartype value: list[~azure.mgmt.containerservice.v2020_12_01.models.OperationValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationValue]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + + +class OperationValue(msrest.serialization.Model): """Describes the properties of a Compute Operation value. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar origin: The origin of the compute operation. :vartype origin: str @@ -2592,7 +2785,10 @@ class OperationValue(Model): 'provider': {'key': 'display.provider', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(OperationValue, self).__init__(**kwargs) self.origin = None self.name = None @@ -2602,11 +2798,11 @@ def __init__(self, **kwargs): self.provider = None -class PowerState(Model): +class PowerState(msrest.serialization.Model): """Describes the Power State of the cluster. - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' + :param code: Tells whether the cluster is Running or Stopped. Possible values include: + "Running", "Stopped". :type code: str or ~azure.mgmt.containerservice.v2020_12_01.models.Code """ @@ -2614,15 +2810,18 @@ class PowerState(Model): 'code': {'key': 'code', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PowerState, self).__init__(**kwargs) self.code = kwargs.get('code', None) -class PrivateEndpoint(Model): +class PrivateEndpoint(msrest.serialization.Model): """Private endpoint which a connection belongs to. - :param id: The resource Id for private endpoint + :param id: The resource Id for private endpoint. :type id: str """ @@ -2630,18 +2829,18 @@ class PrivateEndpoint(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateEndpoint, self).__init__(**kwargs) self.id = kwargs.get('id', None) -class PrivateEndpointConnection(Model): +class PrivateEndpointConnection(msrest.serialization.Model): """A private endpoint connection. - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The ID of the private endpoint connection. :vartype id: str @@ -2649,16 +2848,14 @@ class PrivateEndpointConnection(Model): :vartype name: str :ivar type: The resource type. :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' + :ivar provisioning_state: The current provisioning state. Possible values include: "Succeeded", + "Creating", "Deleting", "Failed". :vartype provisioning_state: str or ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnectionProvisioningState :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. + :type private_endpoint: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. :type private_link_service_connection_state: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkServiceConnectionState """ @@ -2668,7 +2865,6 @@ class PrivateEndpointConnection(Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, } _attribute_map = { @@ -2680,7 +2876,10 @@ class PrivateEndpointConnection(Model): 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateEndpointConnection, self).__init__(**kwargs) self.id = None self.name = None @@ -2690,28 +2889,29 @@ def __init__(self, **kwargs): self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) -class PrivateEndpointConnectionListResult(Model): +class PrivateEndpointConnectionListResult(msrest.serialization.Model): """A list of private endpoint connections. :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection] + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection] """ _attribute_map = { 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) self.value = kwargs.get('value', None) -class PrivateLinkResource(Model): +class PrivateLinkResource(msrest.serialization.Model): """A private link resource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :param id: The ID of the private link resource. :type id: str @@ -2721,10 +2921,10 @@ class PrivateLinkResource(Model): :type type: str :param group_id: The group ID of the resource. :type group_id: str - :param required_members: RequiredMembers of the resource + :param required_members: RequiredMembers of the resource. :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. + :ivar private_link_service_id: The private link service ID of the resource, this field is + exposed only to NRP internally. :vartype private_link_service_id: str """ @@ -2741,7 +2941,10 @@ class PrivateLinkResource(Model): 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateLinkResource, self).__init__(**kwargs) self.id = kwargs.get('id', None) self.name = kwargs.get('name', None) @@ -2751,30 +2954,31 @@ def __init__(self, **kwargs): self.private_link_service_id = None -class PrivateLinkResourcesListResult(Model): +class PrivateLinkResourcesListResult(msrest.serialization.Model): """A list of private link resources. :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource] + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource] """ _attribute_map = { 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateLinkResourcesListResult, self).__init__(**kwargs) self.value = kwargs.get('value', None) -class PrivateLinkServiceConnectionState(Model): +class PrivateLinkServiceConnectionState(msrest.serialization.Model): """The state of a private link service connection. - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2020_12_01.models.ConnectionStatus + :param status: The private link service connection status. Possible values include: "Pending", + "Approved", "Rejected", "Disconnected". + :type status: str or ~azure.mgmt.containerservice.v2020_12_01.models.ConnectionStatus :param description: The private link service connection description. :type description: str """ @@ -2784,13 +2988,16 @@ class PrivateLinkServiceConnectionState(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) self.status = kwargs.get('status', None) self.description = kwargs.get('description', None) -class ResourceReference(Model): +class ResourceReference(msrest.serialization.Model): """A reference to an Azure resource. :param id: The fully qualified Azure resource id. @@ -2801,18 +3008,20 @@ class ResourceReference(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ResourceReference, self).__init__(**kwargs) self.id = kwargs.get('id', None) -class SysctlConfig(Model): +class SysctlConfig(msrest.serialization.Model): """Sysctl settings for Linux agent nodes. :param net_core_somaxconn: Sysctl setting net.core.somaxconn. :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. + :param net_core_netdev_max_backlog: Sysctl setting net.core.netdev_max_backlog. :type net_core_netdev_max_backlog: int :param net_core_rmem_default: Sysctl setting net.core.rmem_default. :type net_core_rmem_default: int @@ -2824,45 +3033,33 @@ class SysctlConfig(Model): :type net_core_wmem_max: int :param net_core_optmem_max: Sysctl setting net.core.optmem_max. :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. + :param net_ipv4_tcp_max_syn_backlog: Sysctl setting net.ipv4.tcp_max_syn_backlog. :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. + :param net_ipv4_tcp_max_tw_buckets: Sysctl setting net.ipv4.tcp_max_tw_buckets. :type net_ipv4_tcp_max_tw_buckets: int :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. + :param net_ipv4_tcp_keepalive_time: Sysctl setting net.ipv4.tcp_keepalive_time. :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. + :param net_ipv4_tcp_keepalive_probes: Sysctl setting net.ipv4.tcp_keepalive_probes. :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. + :param net_ipv4_tcpkeepalive_intvl: Sysctl setting net.ipv4.tcp_keepalive_intvl. :type net_ipv4_tcpkeepalive_intvl: int :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. + :param net_ipv4_ip_local_port_range: Sysctl setting net.ipv4.ip_local_port_range. :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. + :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting net.ipv4.neigh.default.gc_thresh1. :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. + :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting net.ipv4.neigh.default.gc_thresh2. :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. + :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting net.ipv4.neigh.default.gc_thresh3. :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. + :param net_netfilter_nf_conntrack_max: Sysctl setting net.netfilter.nf_conntrack_max. :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. + :param net_netfilter_nf_conntrack_buckets: Sysctl setting net.netfilter.nf_conntrack_buckets. :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. + :param fs_inotify_max_user_watches: Sysctl setting fs.inotify.max_user_watches. :type fs_inotify_max_user_watches: int :param fs_file_max: Sysctl setting fs.file-max. :type fs_file_max: int @@ -2911,7 +3108,10 @@ class SysctlConfig(Model): 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SysctlConfig, self).__init__(**kwargs) self.net_core_somaxconn = kwargs.get('net_core_somaxconn', None) self.net_core_netdev_max_backlog = kwargs.get('net_core_netdev_max_backlog', None) @@ -2943,27 +3143,24 @@ def __init__(self, **kwargs): self.vm_vfs_cache_pressure = kwargs.get('vm_vfs_cache_pressure', None) -class SystemData(Model): +class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. :param created_by: The identity that created the resource. :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.CreatedByType + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.CreatedByType :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime + :type created_at: ~datetime.datetime :param last_modified_by: The identity that last modified the resource. :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". :type last_modified_by_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. - :type last_modified_at: datetime + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime """ _attribute_map = { @@ -2975,7 +3172,10 @@ class SystemData(Model): 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SystemData, self).__init__(**kwargs) self.created_by = kwargs.get('created_by', None) self.created_by_type = kwargs.get('created_by_type', None) @@ -2985,10 +3185,10 @@ def __init__(self, **kwargs): self.last_modified_at = kwargs.get('last_modified_at', None) -class TagsObject(Model): +class TagsObject(msrest.serialization.Model): """Tags object for patch operations. - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -2996,16 +3196,19 @@ class TagsObject(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(TagsObject, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) -class TimeInWeek(Model): +class TimeInWeek(msrest.serialization.Model): """Time in a week. - :param day: A day in a week. Possible values include: 'Sunday', 'Monday', - 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' + :param day: A day in a week. Possible values include: "Sunday", "Monday", "Tuesday", + "Wednesday", "Thursday", "Friday", "Saturday". :type day: str or ~azure.mgmt.containerservice.v2020_12_01.models.WeekDay :param hour_slots: hour slots in a day. :type hour_slots: list[int] @@ -3016,19 +3219,22 @@ class TimeInWeek(Model): 'hour_slots': {'key': 'hourSlots', 'type': '[int]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(TimeInWeek, self).__init__(**kwargs) self.day = kwargs.get('day', None) self.hour_slots = kwargs.get('hour_slots', None) -class TimeSpan(Model): +class TimeSpan(msrest.serialization.Model): """The time span with start and end properties. - :param start: The start of a time span - :type start: datetime - :param end: The end of a time span - :type end: datetime + :param start: The start of a time span. + :type start: ~datetime.datetime + :param end: The end of a time span. + :type end: ~datetime.datetime """ _attribute_map = { @@ -3036,7 +3242,10 @@ class TimeSpan(Model): 'end': {'key': 'end', 'type': 'iso-8601'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(TimeSpan, self).__init__(**kwargs) self.start = kwargs.get('start', None) self.end = kwargs.get('end', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_models_py3.py old mode 100644 new mode 100755 index de71b315522..2b54a24fe94 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_models_py3.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_models_py3.py @@ -1,30 +1,30 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError +import datetime +from typing import Dict, List, Optional, Union +import msrest.serialization -class SubResource(Model): +from ._container_service_client_enums import * + + +class SubResource(msrest.serialization.Model): """Reference to another subresource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str """ @@ -40,7 +40,10 @@ class SubResource(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(SubResource, self).__init__(**kwargs) self.id = None self.name = None @@ -50,172 +53,143 @@ def __init__(self, **kwargs) -> None: class AgentPool(SubResource): """Agent Pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for + system pools. The default value is 1. :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or + :param type_properties_type: AgentPoolType represents types of an agent pool. Possible values + include: "VirtualMachineScaleSets", "AvailabilitySet". + :type type_properties_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_12_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool """ @@ -223,6 +197,7 @@ class AgentPool(SubResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -244,7 +219,7 @@ class AgentPool(SubResource): 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, 'min_count': {'key': 'properties.minCount', 'type': 'int'}, 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, 'mode': {'key': 'properties.mode', 'type': 'str'}, 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, @@ -265,7 +240,39 @@ class AgentPool(SubResource): 'enable_encryption_at_host': {'key': 'properties.enableEncryptionAtHost', 'type': 'bool'}, } - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, **kwargs) -> None: + def __init__( + self, + *, + count: Optional[int] = None, + vm_size: Optional[Union[str, "ContainerServiceVMSizeTypes"]] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "KubeletDiskType"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type_properties_type: Optional[Union[str, "AgentPoolType"]] = None, + mode: Optional[Union[str, "AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["AgentPoolUpgradeSettings"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + scale_set_priority: Optional[Union[str, "ScaleSetPriority"]] = "Regular", + scale_set_eviction_policy: Optional[Union[str, "ScaleSetEvictionPolicy"]] = "Delete", + spot_max_price: Optional[float] = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["KubeletConfig"] = None, + linux_os_config: Optional["LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + **kwargs + ): super(AgentPool, self).__init__(**kwargs) self.count = count self.vm_size = vm_size @@ -279,7 +286,7 @@ def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, self.max_count = max_count self.min_count = min_count self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type + self.type_properties_type = type_properties_type self.mode = mode self.orchestrator_version = orchestrator_version self.node_image_version = None @@ -300,11 +307,10 @@ def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, self.enable_encryption_at_host = enable_encryption_at_host -class AgentPoolAvailableVersions(Model): +class AgentPoolAvailableVersions(msrest.serialization.Model): """The list of available versions for an agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Id of the agent pool available versions. :vartype id: str @@ -330,7 +336,12 @@ class AgentPoolAvailableVersions(Model): 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, } - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: + def __init__( + self, + *, + agent_pool_versions: Optional[List["AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, + **kwargs + ): super(AgentPoolAvailableVersions, self).__init__(**kwargs) self.id = None self.name = None @@ -338,7 +349,7 @@ def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: self.agent_pool_versions = agent_pool_versions -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): +class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(msrest.serialization.Model): """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. :param default: Whether this version is the default agent pool version. @@ -355,18 +366,55 @@ class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: + def __init__( + self, + *, + default: Optional[bool] = None, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) self.default = default self.kubernetes_version = kubernetes_version self.is_preview = is_preview -class AgentPoolUpgradeProfile(Model): +class AgentPoolListResult(msrest.serialization.Model): + """The response from the List Agent Pools operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of agent pools. + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool] + :ivar next_link: The URL to get the next set of agent pool results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AgentPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AgentPool"]] = None, + **kwargs + ): + super(AgentPoolListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class AgentPoolUpgradeProfile(msrest.serialization.Model): """The list of available upgrades for an agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -376,20 +424,16 @@ class AgentPoolUpgradeProfile(Model): :vartype name: str :ivar type: Type of the agent pool upgrade profile. :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. :type upgrades: list[~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. + :param latest_node_image_version: LatestNodeImageVersion is the latest AKS supported node image + version. :type latest_node_image_version: str """ @@ -411,7 +455,15 @@ class AgentPoolUpgradeProfile(Model): 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, } - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, latest_node_image_version: str=None, **kwargs) -> None: + def __init__( + self, + *, + kubernetes_version: str, + os_type: Union[str, "OSType"] = "Linux", + upgrades: Optional[List["AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, + latest_node_image_version: Optional[str] = None, + **kwargs + ): super(AgentPoolUpgradeProfile, self).__init__(**kwargs) self.id = None self.name = None @@ -422,7 +474,7 @@ def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, l self.latest_node_image_version = latest_node_image_version -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): +class AgentPoolUpgradeProfilePropertiesUpgradesItem(msrest.serialization.Model): """AgentPoolUpgradeProfilePropertiesUpgradesItem. :param kubernetes_version: Kubernetes version (major, minor, patch). @@ -436,17 +488,23 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: + def __init__( + self, + *, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) self.kubernetes_version = kubernetes_version self.is_preview = is_preview -class AgentPoolUpgradeSettings(Model): +class AgentPoolUpgradeSettings(msrest.serialization.Model): """Settings for upgrading an agentpool. - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default + :param max_surge: Count or percentage of additional nodes to be added during upgrade. If empty + uses AKS default. :type max_surge: str """ @@ -454,55 +512,51 @@ class AgentPoolUpgradeSettings(Model): 'max_surge': {'key': 'maxSurge', 'type': 'str'}, } - def __init__(self, *, max_surge: str=None, **kwargs) -> None: + def __init__( + self, + *, + max_surge: Optional[str] = None, + **kwargs + ): super(AgentPoolUpgradeSettings, self).__init__(**kwargs) self.max_surge = max_surge -class CloudError(Model): +class CloudError(msrest.serialization.Model): """An error response from the Container service. :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2020_12_01.models.CloudErrorBody + :type error: ~azure.mgmt.containerservice.v2020_12_01.models.CloudErrorBody """ _attribute_map = { 'error': {'key': 'error', 'type': 'CloudErrorBody'}, } - def __init__(self, *, error=None, **kwargs) -> None: + def __init__( + self, + *, + error: Optional["CloudErrorBody"] = None, + **kwargs + ): super(CloudError, self).__init__(**kwargs) self.error = error -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): +class CloudErrorBody(msrest.serialization.Model): """An error response from the Container service. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: A message describing the error, intended to be suitable for display in a user + interface. :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. + :param target: The target of the particular error. For example, the name of the property in + error. :type target: str :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2020_12_01.models.CloudErrorBody] + :type details: list[~azure.mgmt.containerservice.v2020_12_01.models.CloudErrorBody] """ _attribute_map = { @@ -512,7 +566,15 @@ class CloudErrorBody(Model): 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, } - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["CloudErrorBody"]] = None, + **kwargs + ): super(CloudErrorBody, self).__init__(**kwargs) self.code = code self.message = message @@ -520,13 +582,258 @@ def __init__(self, *, code: str=None, message: str=None, target: str=None, detai self.details = details -class ContainerServiceDiagnosticsProfile(Model): +class Components1Q1Og48SchemasManagedclusterAllof1(msrest.serialization.Model): + """Components1Q1Og48SchemasManagedclusterAllof1. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. + :type kubernetes_version: str + :param dns_prefix: DNS prefix specified when creating the managed cluster. + :type dns_prefix: str + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + :ivar private_fqdn: FQDN of private cluster. + :vartype private_fqdn: str + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAgentPoolProfile] + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceLinuxProfile + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterWindowsProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterServicePrincipalProfile + :param addon_profiles: Profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAddonProfile] + :param pod_identity_profile: Profile of managed cluster pod identity. + :type pod_identity_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentityProfile + :param node_resource_group: Name of the resource group containing agent pool nodes. + :type node_resource_group: str + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :type enable_rbac: bool + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. + :type enable_pod_security_policy: bool + :param network_profile: Profile of network configuration. + :type network_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceNetworkProfile + :param aad_profile: Profile of Azure Active Directory configuration. + :type aad_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile + :param auto_upgrade_profile: Profile of auto upgrade configuration. + :type auto_upgrade_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAutoUpgradeProfile + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. + :type auto_scaler_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPropertiesAutoScalerProfile + :param api_server_access_profile: Access profile for managed cluster API server. + :type api_server_access_profile: + ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAPIServerAccessProfile + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. + :type disk_encryption_set_id: str + :param identity_profile: Identities associated with the cluster. + :type identity_profile: dict[str, + ~azure.mgmt.containerservice.v2020_12_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + 'max_agent_pools': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'private_fqdn': {'readonly': True}, + } + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, + 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, + 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, + 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, + 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, + 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, + } + + def __init__( + self, + *, + identity: Optional["ManagedClusterIdentity"] = None, + kubernetes_version: Optional[str] = None, + dns_prefix: Optional[str] = None, + agent_pool_profiles: Optional[List["ManagedClusterAgentPoolProfile"]] = None, + linux_profile: Optional["ContainerServiceLinuxProfile"] = None, + windows_profile: Optional["ManagedClusterWindowsProfile"] = None, + service_principal_profile: Optional["ManagedClusterServicePrincipalProfile"] = None, + addon_profiles: Optional[Dict[str, "ManagedClusterAddonProfile"]] = None, + pod_identity_profile: Optional["ManagedClusterPodIdentityProfile"] = None, + node_resource_group: Optional[str] = None, + enable_rbac: Optional[bool] = None, + enable_pod_security_policy: Optional[bool] = None, + network_profile: Optional["ContainerServiceNetworkProfile"] = None, + aad_profile: Optional["ManagedClusterAADProfile"] = None, + auto_upgrade_profile: Optional["ManagedClusterAutoUpgradeProfile"] = None, + auto_scaler_profile: Optional["ManagedClusterPropertiesAutoScalerProfile"] = None, + api_server_access_profile: Optional["ManagedClusterAPIServerAccessProfile"] = None, + disk_encryption_set_id: Optional[str] = None, + identity_profile: Optional[Dict[str, "ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties"]] = None, + **kwargs + ): + super(Components1Q1Og48SchemasManagedclusterAllof1, self).__init__(**kwargs) + self.identity = identity + self.provisioning_state = None + self.power_state = None + self.max_agent_pools = None + self.kubernetes_version = kubernetes_version + self.dns_prefix = dns_prefix + self.fqdn = None + self.private_fqdn = None + self.agent_pool_profiles = agent_pool_profiles + self.linux_profile = linux_profile + self.windows_profile = windows_profile + self.service_principal_profile = service_principal_profile + self.addon_profiles = addon_profiles + self.pod_identity_profile = pod_identity_profile + self.node_resource_group = node_resource_group + self.enable_rbac = enable_rbac + self.enable_pod_security_policy = enable_pod_security_policy + self.network_profile = network_profile + self.aad_profile = aad_profile + self.auto_upgrade_profile = auto_upgrade_profile + self.auto_scaler_profile = auto_scaler_profile + self.api_server_access_profile = api_server_access_profile + self.disk_encryption_set_id = disk_encryption_set_id + self.identity_profile = identity_profile + + +class Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedIdentity(msrest.serialization.Model): + """UserAssignedIdentity. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.resource_id = resource_id + self.client_id = client_id + self.object_id = object_id + + +class ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties(UserAssignedIdentity): + """ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs + ): + super(ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): """Profile for diagnostics on the container service cluster. All required parameters must be populated in order to send to Azure. - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. :type vm_diagnostics: ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMDiagnostics """ @@ -539,23 +846,25 @@ class ContainerServiceDiagnosticsProfile(Model): 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, } - def __init__(self, *, vm_diagnostics, **kwargs) -> None: + def __init__( + self, + *, + vm_diagnostics: "ContainerServiceVMDiagnostics", + **kwargs + ): super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) self.vm_diagnostics = vm_diagnostics -class ContainerServiceLinuxProfile(Model): +class ContainerServiceLinuxProfile(msrest.serialization.Model): """Profile for Linux VMs in the container service cluster. All required parameters must be populated in order to send to Azure. - :param admin_username: Required. The administrator username to use for - Linux VMs. + :param admin_username: Required. The administrator username to use for Linux VMs. :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceSshConfiguration + :param ssh: Required. SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceSshConfiguration """ _validation = { @@ -568,93 +877,82 @@ class ContainerServiceLinuxProfile(Model): 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, } - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: + def __init__( + self, + *, + admin_username: str, + ssh: "ContainerServiceSshConfiguration", + **kwargs + ): super(ContainerServiceLinuxProfile, self).__init__(**kwargs) self.admin_username = admin_username self.ssh = ssh -class ContainerServiceMasterProfile(Model): +class ContainerServiceMasterProfile(msrest.serialization.Model): """Profile for the container service master. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. + :param count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2020_12_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". :type storage_profile: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceStorageProfileTypes :ivar fqdn: FQDN for the master pool. @@ -664,6 +962,7 @@ class ContainerServiceMasterProfile(Model): _validation = { 'dns_prefix': {'required': True}, 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, 'fqdn': {'readonly': True}, } @@ -678,7 +977,18 @@ class ContainerServiceMasterProfile(Model): 'fqdn': {'key': 'fqdn', 'type': 'str'}, } - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: + def __init__( + self, + *, + dns_prefix: str, + vm_size: Union[str, "ContainerServiceVMSizeTypes"], + count: Optional[Union[int, "Count"]] = "1", + os_disk_size_gb: Optional[int] = None, + vnet_subnet_id: Optional[str] = None, + first_consecutive_static_ip: Optional[str] = "10.240.255.5", + storage_profile: Optional[Union[str, "ContainerServiceStorageProfileTypes"]] = None, + **kwargs + ): super(ContainerServiceMasterProfile, self).__init__(**kwargs) self.count = count self.dns_prefix = dns_prefix @@ -690,46 +1000,35 @@ def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: i self.fqdn = None -class ContainerServiceNetworkProfile(Model): +class ContainerServiceNetworkProfile(msrest.serialization.Model): """Profile of network configuration. - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2020_12_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2020_12_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2020_12_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . + :param network_plugin: Network plugin used for building Kubernetes network. Possible values + include: "azure", "kubenet". Default value: "kubenet". + :type network_plugin: str or ~azure.mgmt.containerservice.v2020_12_01.models.NetworkPlugin + :param network_policy: Network policy used for building Kubernetes network. Possible values + include: "calico", "azure". + :type network_policy: str or ~azure.mgmt.containerservice.v2020_12_01.models.NetworkPolicy + :param network_mode: Network mode used for building Kubernetes network. Possible values + include: "transparent", "bridge". + :type network_mode: str or ~azure.mgmt.containerservice.v2020_12_01.models.NetworkMode + :param pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . + :param service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . + :param dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2020_12_01.models.LoadBalancerSku + :param outbound_type: The outbound (egress) routing method. Possible values include: + "loadBalancer", "userDefinedRouting". Default value: "loadBalancer". + :type outbound_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OutboundType + :param load_balancer_sku: The load balancer sku for the managed cluster. Possible values + include: "standard", "basic". + :type load_balancer_sku: str or ~azure.mgmt.containerservice.v2020_12_01.models.LoadBalancerSku :param load_balancer_profile: Profile of the cluster load balancer. :type load_balancer_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterLoadBalancerProfile @@ -755,7 +1054,21 @@ class ContainerServiceNetworkProfile(Model): 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, } - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: + def __init__( + self, + *, + network_plugin: Optional[Union[str, "NetworkPlugin"]] = "kubenet", + network_policy: Optional[Union[str, "NetworkPolicy"]] = None, + network_mode: Optional[Union[str, "NetworkMode"]] = None, + pod_cidr: Optional[str] = "10.244.0.0/16", + service_cidr: Optional[str] = "10.0.0.0/16", + dns_service_ip: Optional[str] = "10.0.0.10", + docker_bridge_cidr: Optional[str] = "172.17.0.1/16", + outbound_type: Optional[Union[str, "OutboundType"]] = "loadBalancer", + load_balancer_sku: Optional[Union[str, "LoadBalancerSku"]] = None, + load_balancer_profile: Optional["ManagedClusterLoadBalancerProfile"] = None, + **kwargs + ): super(ContainerServiceNetworkProfile, self).__init__(**kwargs) self.network_plugin = network_plugin self.network_policy = network_policy @@ -769,13 +1082,13 @@ def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mod self.load_balancer_profile = load_balancer_profile -class ContainerServiceSshConfiguration(Model): +class ContainerServiceSshConfiguration(msrest.serialization.Model): """SSH configuration for Linux-based VMs running on Azure. All required parameters must be populated in order to send to Azure. - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. Only expect one key specified. :type public_keys: list[~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceSshPublicKey] """ @@ -788,19 +1101,23 @@ class ContainerServiceSshConfiguration(Model): 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, } - def __init__(self, *, public_keys, **kwargs) -> None: + def __init__( + self, + *, + public_keys: List["ContainerServiceSshPublicKey"], + **kwargs + ): super(ContainerServiceSshConfiguration, self).__init__(**kwargs) self.public_keys = public_keys -class ContainerServiceSshPublicKey(Model): +class ContainerServiceSshPublicKey(msrest.serialization.Model): """Contains information about SSH certificate public key data. All required parameters must be populated in order to send to Azure. - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. :type key_data: str """ @@ -812,24 +1129,26 @@ class ContainerServiceSshPublicKey(Model): 'key_data': {'key': 'keyData', 'type': 'str'}, } - def __init__(self, *, key_data: str, **kwargs) -> None: + def __init__( + self, + *, + key_data: str, + **kwargs + ): super(ContainerServiceSshPublicKey, self).__init__(**kwargs) self.key_data = key_data -class ContainerServiceVMDiagnostics(Model): +class ContainerServiceVMDiagnostics(msrest.serialization.Model): """Profile for diagnostics on the container service VMs. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. + :param enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. + :ivar storage_uri: The URI of the storage account where diagnostics are stored. :vartype storage_uri: str """ @@ -843,17 +1162,21 @@ class ContainerServiceVMDiagnostics(Model): 'storage_uri': {'key': 'storageUri', 'type': 'str'}, } - def __init__(self, *, enabled: bool, **kwargs) -> None: + def __init__( + self, + *, + enabled: bool, + **kwargs + ): super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) self.enabled = enabled self.storage_uri = None -class CredentialResult(Model): +class CredentialResult(msrest.serialization.Model): """The credential result response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar name: The name of the credential. :vartype name: str @@ -871,21 +1194,22 @@ class CredentialResult(Model): 'value': {'key': 'value', 'type': 'bytearray'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(CredentialResult, self).__init__(**kwargs) self.name = None self.value = None -class CredentialResults(Model): +class CredentialResults(msrest.serialization.Model): """The list of credential result response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2020_12_01.models.CredentialResult] + :vartype kubeconfigs: list[~azure.mgmt.containerservice.v2020_12_01.models.CredentialResult] """ _validation = { @@ -896,40 +1220,42 @@ class CredentialResults(Model): 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(CredentialResults, self).__init__(**kwargs) self.kubeconfigs = None -class KubeletConfig(Model): +class KubeletConfig(msrest.serialization.Model): """Kubelet configurations of agent nodes. :param cpu_manager_policy: CPU Manager policy to use. :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. + :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that specify CPU limits. :type cpu_cfs_quota: bool :param cpu_cfs_quota_period: Sets CPU CFS quota period value. :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. + :param image_gc_high_threshold: The percent of disk usage after which image garbage collection + is always run. :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. + :param image_gc_low_threshold: The percent of disk usage before which image garbage collection + is never run. :type image_gc_low_threshold: int :param topology_manager_policy: Topology Manager policy to use. :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). + :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe sysctl patterns (ending in + ``*``\ ). :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. + :param fail_swap_on: If set to true it will make the Kubelet fail to start if swap is enabled + on the node. :type fail_swap_on: bool - :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of - container log file before it is rotated. + :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of container log file before it + is rotated. :type container_log_max_size_mb: int - :param container_log_max_files: The maximum number of container log files - that can be present for a container. The number must be ≥ 2. + :param container_log_max_files: The maximum number of container log files that can be present + for a container. The number must be ≥ 2. :type container_log_max_files: int :param pod_max_pids: The maximum number of processes per pod. :type pod_max_pids: int @@ -953,7 +1279,22 @@ class KubeletConfig(Model): 'pod_max_pids': {'key': 'podMaxPids', 'type': 'int'}, } - def __init__(self, *, cpu_manager_policy: str=None, cpu_cfs_quota: bool=None, cpu_cfs_quota_period: str=None, image_gc_high_threshold: int=None, image_gc_low_threshold: int=None, topology_manager_policy: str=None, allowed_unsafe_sysctls=None, fail_swap_on: bool=None, container_log_max_size_mb: int=None, container_log_max_files: int=None, pod_max_pids: int=None, **kwargs) -> None: + def __init__( + self, + *, + cpu_manager_policy: Optional[str] = None, + cpu_cfs_quota: Optional[bool] = None, + cpu_cfs_quota_period: Optional[str] = None, + image_gc_high_threshold: Optional[int] = None, + image_gc_low_threshold: Optional[int] = None, + topology_manager_policy: Optional[str] = None, + allowed_unsafe_sysctls: Optional[List[str]] = None, + fail_swap_on: Optional[bool] = None, + container_log_max_size_mb: Optional[int] = None, + container_log_max_files: Optional[int] = None, + pod_max_pids: Optional[int] = None, + **kwargs + ): super(KubeletConfig, self).__init__(**kwargs) self.cpu_manager_policy = cpu_manager_policy self.cpu_cfs_quota = cpu_cfs_quota @@ -968,20 +1309,17 @@ def __init__(self, *, cpu_manager_policy: str=None, cpu_cfs_quota: bool=None, cp self.pod_max_pids = pod_max_pids -class LinuxOSConfig(Model): +class LinuxOSConfig(msrest.serialization.Model): """OS configurations of Linux agent nodes. :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2020_12_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. + :type sysctls: ~azure.mgmt.containerservice.v2020_12_01.models.SysctlConfig + :param transparent_huge_page_enabled: Transparent Huge Page enabled configuration. :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. + :param transparent_huge_page_defrag: Transparent Huge Page defrag configuration. :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. + :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap file will be created on + each node. :type swap_file_size_mb: int """ @@ -992,7 +1330,15 @@ class LinuxOSConfig(Model): 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, } - def __init__(self, *, sysctls=None, transparent_huge_page_enabled: str=None, transparent_huge_page_defrag: str=None, swap_file_size_mb: int=None, **kwargs) -> None: + def __init__( + self, + *, + sysctls: Optional["SysctlConfig"] = None, + transparent_huge_page_enabled: Optional[str] = None, + transparent_huge_page_defrag: Optional[str] = None, + swap_file_size_mb: Optional[int] = None, + **kwargs + ): super(LinuxOSConfig, self).__init__(**kwargs) self.sysctls = sysctls self.transparent_huge_page_enabled = transparent_huge_page_enabled @@ -1003,25 +1349,21 @@ def __init__(self, *, sysctls=None, transparent_huge_page_enabled: str=None, tra class MaintenanceConfiguration(SubResource): """maintenance configuration. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str :ivar system_data: The system meta data relating to this resource. - :vartype system_data: - ~azure.mgmt.containerservice.v2020_12_01.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2020_12_01.models.SystemData :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2020_12_01.models.TimeInWeek] + :type time_in_week: list[~azure.mgmt.containerservice.v2020_12_01.models.TimeInWeek] :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2020_12_01.models.TimeSpan] + :type not_allowed_time: list[~azure.mgmt.containerservice.v2020_12_01.models.TimeSpan] """ _validation = { @@ -1040,30 +1382,66 @@ class MaintenanceConfiguration(SubResource): 'not_allowed_time': {'key': 'properties.notAllowedTime', 'type': '[TimeSpan]'}, } - def __init__(self, *, time_in_week=None, not_allowed_time=None, **kwargs) -> None: + def __init__( + self, + *, + time_in_week: Optional[List["TimeInWeek"]] = None, + not_allowed_time: Optional[List["TimeSpan"]] = None, + **kwargs + ): super(MaintenanceConfiguration, self).__init__(**kwargs) self.system_data = None self.time_in_week = time_in_week self.not_allowed_time = not_allowed_time -class Resource(Model): +class MaintenanceConfigurationListResult(msrest.serialization.Model): + """The response from the List maintenance configurations operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of maintenance configurations. + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration] + :ivar next_link: The URL to get the next set of maintenance configuration results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MaintenanceConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["MaintenanceConfiguration"]] = None, + **kwargs + ): + super(MaintenanceConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class Resource(msrest.serialization.Model): """The Resource model definition. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id + :ivar id: Resource Id. :vartype id: str - :ivar name: Resource name + :ivar name: Resource name. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param location: Required. Resource location + :param location: Required. Resource location. :type location: str - :param tags: Resource tags + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -1082,7 +1460,13 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, location: str, tags=None, **kwargs) -> None: + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): super(Resource, self).__init__(**kwargs) self.id = None self.name = None @@ -1091,35 +1475,23 @@ def __init__(self, *, location: str, tags=None, **kwargs) -> None: self.tags = tags -class ManagedCluster(Resource): +class ManagedCluster(Resource, Components1Q1Og48SchemasManagedclusterAllof1): """Managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2020_12_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. :type kubernetes_version: str :param dns_prefix: DNS prefix specified when creating the managed cluster. :type dns_prefix: str @@ -1130,16 +1502,14 @@ class ManagedCluster(Resource): :param agent_pool_profiles: Properties of the agent pool. :type agent_pool_profiles: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. + :param linux_profile: Profile for Linux VMs in the container service cluster. :type linux_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. + :param windows_profile: Profile for Windows VMs in the container service cluster. :type windows_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. :type service_principal_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterServicePrincipalProfile :param addon_profiles: Profile of managed cluster add-on. @@ -1148,65 +1518,62 @@ class ManagedCluster(Resource): :param pod_identity_profile: Profile of managed cluster pod identity. :type pod_identity_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. + :param node_resource_group: Name of the resource group containing agent pool nodes. :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. :type enable_pod_security_policy: bool :param network_profile: Profile of network configuration. :type network_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceNetworkProfile :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile + :type aad_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile :param auto_upgrade_profile: Profile of auto upgrade configuration. :type auto_upgrade_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. :type auto_scaler_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. + :param api_server_access_profile: Access profile for managed cluster API server. :type api_server_access_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. :type disk_encryption_set_id: str :param identity_profile: Identities associated with the cluster. :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterIdentity + ~azure.mgmt.containerservice.v2020_12_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKU + :type sku: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKU """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, 'max_agent_pools': {'readonly': True}, 'fqdn': {'readonly': True}, 'private_fqdn': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, @@ -1229,13 +1596,44 @@ class ManagedCluster(Resource): 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, } - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, pod_identity_profile=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_upgrade_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, identity=None, sku=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) + def __init__( + self, + *, + location: str, + identity: Optional["ManagedClusterIdentity"] = None, + kubernetes_version: Optional[str] = None, + dns_prefix: Optional[str] = None, + agent_pool_profiles: Optional[List["ManagedClusterAgentPoolProfile"]] = None, + linux_profile: Optional["ContainerServiceLinuxProfile"] = None, + windows_profile: Optional["ManagedClusterWindowsProfile"] = None, + service_principal_profile: Optional["ManagedClusterServicePrincipalProfile"] = None, + addon_profiles: Optional[Dict[str, "ManagedClusterAddonProfile"]] = None, + pod_identity_profile: Optional["ManagedClusterPodIdentityProfile"] = None, + node_resource_group: Optional[str] = None, + enable_rbac: Optional[bool] = None, + enable_pod_security_policy: Optional[bool] = None, + network_profile: Optional["ContainerServiceNetworkProfile"] = None, + aad_profile: Optional["ManagedClusterAADProfile"] = None, + auto_upgrade_profile: Optional["ManagedClusterAutoUpgradeProfile"] = None, + auto_scaler_profile: Optional["ManagedClusterPropertiesAutoScalerProfile"] = None, + api_server_access_profile: Optional["ManagedClusterAPIServerAccessProfile"] = None, + disk_encryption_set_id: Optional[str] = None, + identity_profile: Optional[Dict[str, "ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties"]] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["ManagedClusterSKU"] = None, + **kwargs + ): + super(ManagedCluster, self).__init__(location=location, tags=tags, identity=identity, kubernetes_version=kubernetes_version, dns_prefix=dns_prefix, agent_pool_profiles=agent_pool_profiles, linux_profile=linux_profile, windows_profile=windows_profile, service_principal_profile=service_principal_profile, addon_profiles=addon_profiles, pod_identity_profile=pod_identity_profile, node_resource_group=node_resource_group, enable_rbac=enable_rbac, enable_pod_security_policy=enable_pod_security_policy, network_profile=network_profile, aad_profile=aad_profile, auto_upgrade_profile=auto_upgrade_profile, auto_scaler_profile=auto_scaler_profile, api_server_access_profile=api_server_access_profile, disk_encryption_set_id=disk_encryption_set_id, identity_profile=identity_profile, **kwargs) + self.identity = identity self.provisioning_state = None self.power_state = None self.max_agent_pools = None @@ -1259,47 +1657,61 @@ def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dn self.api_server_access_profile = api_server_access_profile self.disk_encryption_set_id = disk_encryption_set_id self.identity_profile = identity_profile - self.identity = identity + self.sku = sku + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags self.sku = sku -class ManagedClusterAADProfile(Model): +class ManagedClusterAADProfile(msrest.serialization.Model): """AADProfile specifies attributes for Azure Active Directory integration. :param managed: Whether to enable managed AAD. :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. + :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes authorization. :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] + :param admin_group_object_i_ds: AAD group object IDs that will have admin role of the cluster. + :type admin_group_object_i_ds: list[str] :param client_app_id: The client AAD application ID. :type client_app_id: str :param server_app_id: The server AAD application ID. :type server_app_id: str :param server_app_secret: The server AAD application secret. :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. + :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. :type tenant_id: str """ _attribute_map = { 'managed': {'key': 'managed', 'type': 'bool'}, 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, + 'admin_group_object_i_ds': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, 'tenant_id': {'key': 'tenantID', 'type': 'str'}, } - def __init__(self, *, managed: bool=None, enable_azure_rbac: bool=None, admin_group_object_ids=None, client_app_id: str=None, server_app_id: str=None, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: + def __init__( + self, + *, + managed: Optional[bool] = None, + enable_azure_rbac: Optional[bool] = None, + admin_group_object_i_ds: Optional[List[str]] = None, + client_app_id: Optional[str] = None, + server_app_id: Optional[str] = None, + server_app_secret: Optional[str] = None, + tenant_id: Optional[str] = None, + **kwargs + ): super(ManagedClusterAADProfile, self).__init__(**kwargs) self.managed = managed self.enable_azure_rbac = enable_azure_rbac - self.admin_group_object_ids = admin_group_object_ids + self.admin_group_object_i_ds = admin_group_object_i_ds self.client_app_id = client_app_id self.server_app_id = server_app_id self.server_app_secret = server_app_secret @@ -1309,20 +1721,19 @@ def __init__(self, *, managed: bool=None, enable_azure_rbac: bool=None, admin_gr class ManagedClusterAccessProfile(Resource): """Managed cluster Access Profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id + :ivar id: Resource Id. :vartype id: str - :ivar name: Resource name + :ivar name: Resource name. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param location: Required. Resource location + :param location: Required. Resource location. :type location: str - :param tags: Resource tags + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param kube_config: Base64-encoded Kubernetes configuration file. :type kube_config: bytearray @@ -1344,16 +1755,22 @@ class ManagedClusterAccessProfile(Resource): 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, } - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytearray] = None, + **kwargs + ): super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) self.kube_config = kube_config -class ManagedClusterAddonProfile(Model): +class ManagedClusterAddonProfile(msrest.serialization.Model): """A Kubernetes add-on profile for a managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -1377,37 +1794,19 @@ class ManagedClusterAddonProfile(Model): 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, } - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: + def __init__( + self, + *, + enabled: bool, + config: Optional[Dict[str, str]] = None, + **kwargs + ): super(ManagedClusterAddonProfile, self).__init__(**kwargs) self.enabled = enabled self.config = config self.identity = None -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): """Information of user assigned identity used by this add-on. @@ -1425,176 +1824,154 @@ class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): 'object_id': {'key': 'objectId', 'type': 'str'}, } - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs + ): super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) -class ManagedClusterAgentPoolProfileProperties(Model): +class ManagedClusterAgentPoolProfileProperties(msrest.serialization.Model): """Properties for the container service agent pool profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for + system pools. The default value is 1. :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_12_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool """ _validation = { + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -1634,7 +2011,39 @@ class ManagedClusterAgentPoolProfileProperties(Model): 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, } - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, **kwargs) -> None: + def __init__( + self, + *, + count: Optional[int] = None, + vm_size: Optional[Union[str, "ContainerServiceVMSizeTypes"]] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "KubeletDiskType"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type: Optional[Union[str, "AgentPoolType"]] = None, + mode: Optional[Union[str, "AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["AgentPoolUpgradeSettings"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + scale_set_priority: Optional[Union[str, "ScaleSetPriority"]] = "Regular", + scale_set_eviction_policy: Optional[Union[str, "ScaleSetEvictionPolicy"]] = "Delete", + spot_max_price: Optional[float] = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["KubeletConfig"] = None, + linux_os_config: Optional["LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + **kwargs + ): super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) self.count = count self.vm_size = vm_size @@ -1672,174 +2081,145 @@ def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): """Profile for the container service agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for + system pools. The default value is 1. :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2020_12_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2020_12_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2020_12_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2020_12_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2020_12_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2020_12_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. + :param name: Required. Unique name of the agent pool profile in the context of the subscription + and resource group. :type name: str """ _validation = { + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -1881,19 +2261,50 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): 'name': {'key': 'name', 'type': 'str'}, } - def __init__(self, *, name: str, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, **kwargs) -> None: + def __init__( + self, + *, + name: str, + count: Optional[int] = None, + vm_size: Optional[Union[str, "ContainerServiceVMSizeTypes"]] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "KubeletDiskType"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type: Optional[Union[str, "AgentPoolType"]] = None, + mode: Optional[Union[str, "AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["AgentPoolUpgradeSettings"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + scale_set_priority: Optional[Union[str, "ScaleSetPriority"]] = "Regular", + scale_set_eviction_policy: Optional[Union[str, "ScaleSetEvictionPolicy"]] = "Delete", + spot_max_price: Optional[float] = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["KubeletConfig"] = None, + linux_os_config: Optional["LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + **kwargs + ): super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, os_disk_type=os_disk_type, kubelet_disk_type=kubelet_disk_type, vnet_subnet_id=vnet_subnet_id, pod_subnet_id=pod_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, upgrade_settings=upgrade_settings, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, proximity_placement_group_id=proximity_placement_group_id, kubelet_config=kubelet_config, linux_os_config=linux_os_config, enable_encryption_at_host=enable_encryption_at_host, **kwargs) self.name = name -class ManagedClusterAPIServerAccessProfile(Model): +class ManagedClusterAPIServerAccessProfile(msrest.serialization.Model): """Access profile for managed cluster API server. - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. + :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. + :param enable_private_cluster: Whether to create the cluster as a private cluster or not. :type enable_private_cluster: bool :param private_dns_zone: Private dns zone mode for private cluster. :type private_dns_zone: str @@ -1905,58 +2316,65 @@ class ManagedClusterAPIServerAccessProfile(Model): 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, } - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, private_dns_zone: str=None, **kwargs) -> None: + def __init__( + self, + *, + authorized_ip_ranges: Optional[List[str]] = None, + enable_private_cluster: Optional[bool] = None, + private_dns_zone: Optional[str] = None, + **kwargs + ): super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) self.authorized_ip_ranges = authorized_ip_ranges self.enable_private_cluster = enable_private_cluster self.private_dns_zone = private_dns_zone -class ManagedClusterAutoUpgradeProfile(Model): +class ManagedClusterAutoUpgradeProfile(msrest.serialization.Model): """Auto upgrade profile for a managed cluster. - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2020_12_01.models.UpgradeChannel + :param upgrade_channel: upgrade channel for auto upgrade. Possible values include: "rapid", + "stable", "patch", "none". + :type upgrade_channel: str or ~azure.mgmt.containerservice.v2020_12_01.models.UpgradeChannel """ _attribute_map = { 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, } - def __init__(self, *, upgrade_channel=None, **kwargs) -> None: + def __init__( + self, + *, + upgrade_channel: Optional[Union[str, "UpgradeChannel"]] = None, + **kwargs + ): super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) self.upgrade_channel = upgrade_channel -class ManagedClusterIdentity(Model): +class ManagedClusterIdentity(msrest.serialization.Model): """Identity for the managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. + :ivar principal_id: The principal id of the system assigned identity which is used by master + components. :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. + :ivar tenant_id: The tenant id of the system assigned identity which is used by master + components. :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: + :param type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use + an implicitly created identity in master components and an auto-created user assigned identity + in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, + service principal will be used instead. Possible values include: "SystemAssigned", + "UserAssigned", "None". + :type type: str or ~azure.mgmt.containerservice.v2020_12_01.models.ResourceIdentityType + :param user_assigned_identities: The user identity associated with the managed cluster. This + identity will be used in control plane and only one user assigned identity is allowed. The user + identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] + ~azure.mgmt.containerservice.v2020_12_01.models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties] """ _validation = { @@ -1967,11 +2385,17 @@ class ManagedClusterIdentity(Model): _attribute_map = { 'principal_id': {'key': 'principalId', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties}'}, } - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + def __init__( + self, + *, + type: Optional[Union[str, "ResourceIdentityType"]] = None, + user_assigned_identities: Optional[Dict[str, "Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None, + **kwargs + ): super(ManagedClusterIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None @@ -1979,61 +2403,60 @@ def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> Non self.user_assigned_identities = user_assigned_identities -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. +class ManagedClusterListResult(msrest.serialization.Model): + """The response from the List Managed Clusters operation. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str + :param value: The list of managed clusters. + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] + :ivar next_link: The URL to get the next set of managed cluster results. + :vartype next_link: str """ _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, + 'next_link': {'readonly': True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ManagedCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None + def __init__( + self, + *, + value: Optional[List["ManagedCluster"]] = None, + **kwargs + ): + super(ManagedClusterListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None -class ManagedClusterLoadBalancerProfile(Model): +class ManagedClusterLoadBalancerProfile(msrest.serialization.Model): """Profile of the managed cluster load balancer. - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: + :param managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. + :type managed_outbound_i_ps: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. + :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the cluster load + balancer. :type outbound_ip_prefixes: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: + :param outbound_i_ps: Desired outbound IP resources for the cluster load balancer. + :type outbound_i_ps: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: + :param effective_outbound_i_ps: The effective outbound IP resources of the cluster load + balancer. + :type effective_outbound_i_ps: list[~azure.mgmt.containerservice.v2020_12_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . + :param allocated_outbound_ports: Desired number of allocated SNAT ports per VM. Allowed values + must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure + dynamically allocating ports. :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . + :param idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + must be in the range of 4 to 120 (inclusive). The default value is 30 minutes. :type idle_timeout_in_minutes: int """ @@ -2043,30 +2466,39 @@ class ManagedClusterLoadBalancerProfile(Model): } _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, + 'managed_outbound_i_ps': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, + 'outbound_i_ps': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, + 'effective_outbound_i_ps': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, } - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: + def __init__( + self, + *, + managed_outbound_i_ps: Optional["ManagedClusterLoadBalancerProfileManagedOutboundIPs"] = None, + outbound_ip_prefixes: Optional["ManagedClusterLoadBalancerProfileOutboundIPPrefixes"] = None, + outbound_i_ps: Optional["ManagedClusterLoadBalancerProfileOutboundIPs"] = None, + effective_outbound_i_ps: Optional[List["ResourceReference"]] = None, + allocated_outbound_ports: Optional[int] = 0, + idle_timeout_in_minutes: Optional[int] = 30, + **kwargs + ): super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips + self.managed_outbound_i_ps = managed_outbound_i_ps self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips + self.outbound_i_ps = outbound_i_ps + self.effective_outbound_i_ps = effective_outbound_i_ps self.allocated_outbound_ports = allocated_outbound_ports self.idle_timeout_in_minutes = idle_timeout_in_minutes -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): +class ManagedClusterLoadBalancerProfileManagedOutboundIPs(msrest.serialization.Model): """Desired managed outbound IPs for the cluster load balancer. - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . + :param count: Desired number of outbound IP created/managed by Azure for the cluster load + balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. :type count: int """ @@ -2078,12 +2510,17 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): 'count': {'key': 'count', 'type': 'int'}, } - def __init__(self, *, count: int=1, **kwargs) -> None: + def __init__( + self, + *, + count: Optional[int] = 1, + **kwargs + ): super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) self.count = count -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): +class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(msrest.serialization.Model): """Desired outbound IP Prefix resources for the cluster load balancer. :param public_ip_prefixes: A list of public IP prefix resources. @@ -2095,33 +2532,41 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, } - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: + def __init__( + self, + *, + public_ip_prefixes: Optional[List["ResourceReference"]] = None, + **kwargs + ): super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) self.public_ip_prefixes = public_ip_prefixes -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): +class ManagedClusterLoadBalancerProfileOutboundIPs(msrest.serialization.Model): """Desired outbound IP resources for the cluster load balancer. - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2020_12_01.models.ResourceReference] + :param public_i_ps: A list of public IP resources. + :type public_i_ps: list[~azure.mgmt.containerservice.v2020_12_01.models.ResourceReference] """ _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, + 'public_i_ps': {'key': 'publicIPs', 'type': '[ResourceReference]'}, } - def __init__(self, *, public_ips=None, **kwargs) -> None: + def __init__( + self, + *, + public_i_ps: Optional[List["ResourceReference"]] = None, + **kwargs + ): super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips + self.public_i_ps = public_i_ps -class ManagedClusterPodIdentity(Model): +class ManagedClusterPodIdentity(msrest.serialization.Model): """ManagedClusterPodIdentity. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2130,11 +2575,9 @@ class ManagedClusterPodIdentity(Model): :param namespace: Required. Namespace of the pod identity. :type namespace: str :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2020_12_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' + :type identity: ~azure.mgmt.containerservice.v2020_12_01.models.UserAssignedIdentity + :ivar provisioning_state: The current provisioning state of the pod identity. Possible values + include: "Assigned", "Updating", "Deleting", "Failed". :vartype provisioning_state: str or ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentityProvisioningState :ivar provisioning_info: @@ -2158,7 +2601,14 @@ class ManagedClusterPodIdentity(Model): 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, } - def __init__(self, *, name: str, namespace: str, identity, **kwargs) -> None: + def __init__( + self, + *, + name: str, + namespace: str, + identity: "UserAssignedIdentity", + **kwargs + ): super(ManagedClusterPodIdentity, self).__init__(**kwargs) self.name = name self.namespace = namespace @@ -2167,7 +2617,7 @@ def __init__(self, *, name: str, namespace: str, identity, **kwargs) -> None: self.provisioning_info = None -class ManagedClusterPodIdentityException(Model): +class ManagedClusterPodIdentityException(msrest.serialization.Model): """ManagedClusterPodIdentityException. All required parameters must be populated in order to send to Azure. @@ -2192,14 +2642,21 @@ class ManagedClusterPodIdentityException(Model): 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, } - def __init__(self, *, name: str, namespace: str, pod_labels, **kwargs) -> None: + def __init__( + self, + *, + name: str, + namespace: str, + pod_labels: Dict[str, str], + **kwargs + ): super(ManagedClusterPodIdentityException, self).__init__(**kwargs) self.name = name self.namespace = namespace self.pod_labels = pod_labels -class ManagedClusterPodIdentityProfile(Model): +class ManagedClusterPodIdentityProfile(msrest.serialization.Model): """ManagedClusterPodIdentityProfile. :param enabled: Whether the pod identity addon is enabled. @@ -2207,8 +2664,7 @@ class ManagedClusterPodIdentityProfile(Model): :param user_assigned_identities: User assigned pod identity settings. :type user_assigned_identities: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. + :param user_assigned_identity_exceptions: User assigned pod identity exception settings. :type user_assigned_identity_exceptions: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPodIdentityException] """ @@ -2219,14 +2675,21 @@ class ManagedClusterPodIdentityProfile(Model): 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, } - def __init__(self, *, enabled: bool=None, user_assigned_identities=None, user_assigned_identity_exceptions=None, **kwargs) -> None: + def __init__( + self, + *, + enabled: Optional[bool] = None, + user_assigned_identities: Optional[List["ManagedClusterPodIdentity"]] = None, + user_assigned_identity_exceptions: Optional[List["ManagedClusterPodIdentityException"]] = None, + **kwargs + ): super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) self.enabled = enabled self.user_assigned_identities = user_assigned_identities self.user_assigned_identity_exceptions = user_assigned_identity_exceptions -class ManagedClusterPodIdentityProvisioningInfo(Model): +class ManagedClusterPodIdentityProvisioningInfo(msrest.serialization.Model): """ManagedClusterPodIdentityProvisioningInfo. :param error: Pod identity assignment error (if any). @@ -2237,28 +2700,29 @@ class ManagedClusterPodIdentityProvisioningInfo(Model): 'error': {'key': 'error', 'type': 'CloudError'}, } - def __init__(self, *, error=None, **kwargs) -> None: + def __init__( + self, + *, + error: Optional["CloudError"] = None, + **kwargs + ): super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) self.error = error -class ManagedClusterPoolUpgradeProfile(Model): +class ManagedClusterPoolUpgradeProfile(msrest.serialization.Model): """The list of available upgrade versions. All required parameters must be populated in order to send to Azure. - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). :type kubernetes_version: str :param name: Pool name. :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. :type upgrades: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] """ @@ -2275,7 +2739,15 @@ class ManagedClusterPoolUpgradeProfile(Model): 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, } - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: + def __init__( + self, + *, + kubernetes_version: str, + os_type: Union[str, "OSType"] = "Linux", + name: Optional[str] = None, + upgrades: Optional[List["ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, + **kwargs + ): super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) self.kubernetes_version = kubernetes_version self.name = name @@ -2283,7 +2755,7 @@ def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", self.upgrades = upgrades -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): +class ManagedClusterPoolUpgradeProfileUpgradesItem(msrest.serialization.Model): """ManagedClusterPoolUpgradeProfileUpgradesItem. :param kubernetes_version: Kubernetes version (major, minor, patch). @@ -2297,21 +2769,25 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: + def __init__( + self, + *, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) self.kubernetes_version = kubernetes_version self.is_preview = is_preview -class ManagedClusterPropertiesAutoScalerProfile(Model): +class ManagedClusterPropertiesAutoScalerProfile(msrest.serialization.Model): """Parameters to be applied to the cluster-autoscaler when enabled. :param balance_similar_node_groups: :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'priority', 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2020_12_01.models.Expander + :param expander: Possible values include: "least-waste", "most-pods", "priority", "random". + :type expander: str or ~azure.mgmt.containerservice.v2020_12_01.models.Expander :param max_empty_bulk_delete: :type max_empty_bulk_delete: str :param max_graceful_termination_sec: @@ -2364,7 +2840,28 @@ class ManagedClusterPropertiesAutoScalerProfile(Model): 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, } - def __init__(self, *, balance_similar_node_groups: str=None, expander=None, max_empty_bulk_delete: str=None, max_graceful_termination_sec: str=None, max_node_provision_time: str=None, max_total_unready_percentage: str=None, new_pod_scale_up_delay: str=None, ok_total_unready_count: str=None, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, skip_nodes_with_local_storage: str=None, skip_nodes_with_system_pods: str=None, **kwargs) -> None: + def __init__( + self, + *, + balance_similar_node_groups: Optional[str] = None, + expander: Optional[Union[str, "Expander"]] = None, + max_empty_bulk_delete: Optional[str] = None, + max_graceful_termination_sec: Optional[str] = None, + max_node_provision_time: Optional[str] = None, + max_total_unready_percentage: Optional[str] = None, + new_pod_scale_up_delay: Optional[str] = None, + ok_total_unready_count: Optional[str] = None, + scan_interval: Optional[str] = None, + scale_down_delay_after_add: Optional[str] = None, + scale_down_delay_after_delete: Optional[str] = None, + scale_down_delay_after_failure: Optional[str] = None, + scale_down_unneeded_time: Optional[str] = None, + scale_down_unready_time: Optional[str] = None, + scale_down_utilization_threshold: Optional[str] = None, + skip_nodes_with_local_storage: Optional[str] = None, + skip_nodes_with_system_pods: Optional[str] = None, + **kwargs + ): super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) self.balance_similar_node_groups = balance_similar_node_groups self.expander = expander @@ -2385,37 +2882,14 @@ def __init__(self, *, balance_similar_node_groups: str=None, expander=None, max_ self.skip_nodes_with_system_pods = skip_nodes_with_system_pods -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. +class ManagedClusterServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. All required parameters must be populated in order to send to Azure. :param client_id: Required. The ID for the service principal. :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. + :param secret: The secret password associated with the service principal in plain text. :type secret: str """ @@ -2428,23 +2902,25 @@ class ManagedClusterServicePrincipalProfile(Model): 'secret': {'key': 'secret', 'type': 'str'}, } - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: + def __init__( + self, + *, + client_id: str, + secret: Optional[str] = None, + **kwargs + ): super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) self.client_id = client_id self.secret = secret -class ManagedClusterSKU(Model): +class ManagedClusterSKU(msrest.serialization.Model): """ManagedClusterSKU. - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKUTier + :param name: Name of a managed cluster SKU. Possible values include: "Basic". + :type name: str or ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKUName + :param tier: Tier of a managed cluster SKU. Possible values include: "Paid", "Free". + :type tier: str or ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterSKUTier """ _attribute_map = { @@ -2452,17 +2928,22 @@ class ManagedClusterSKU(Model): 'tier': {'key': 'tier', 'type': 'str'}, } - def __init__(self, *, name=None, tier=None, **kwargs) -> None: + def __init__( + self, + *, + name: Optional[Union[str, "ManagedClusterSKUName"]] = None, + tier: Optional[Union[str, "ManagedClusterSKUTier"]] = None, + **kwargs + ): super(ManagedClusterSKU, self).__init__(**kwargs) self.name = name self.tier = tier -class ManagedClusterUpgradeProfile(Model): +class ManagedClusterUpgradeProfile(msrest.serialization.Model): """The list of available upgrades for compute pools. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2472,12 +2953,11 @@ class ManagedClusterUpgradeProfile(Model): :vartype name: str :ivar type: Type of upgrade profile. :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. + :param control_plane_profile: Required. The list of available upgrade versions for the control + plane. :type control_plane_profile: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. + :param agent_pool_profiles: Required. The list of available upgrade versions for agent pools. :type agent_pool_profiles: list[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPoolUpgradeProfile] """ @@ -2498,7 +2978,13 @@ class ManagedClusterUpgradeProfile(Model): 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, } - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: + def __init__( + self, + *, + control_plane_profile: "ManagedClusterPoolUpgradeProfile", + agent_pool_profiles: List["ManagedClusterPoolUpgradeProfile"], + **kwargs + ): super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) self.id = None self.name = None @@ -2507,34 +2993,30 @@ def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> N self.agent_pool_profiles = agent_pool_profiles -class ManagedClusterWindowsProfile(Model): +class ManagedClusterWindowsProfile(msrest.serialization.Model): """Profile for Windows VMs in the container service cluster. All required parameters must be populated in order to send to Azure. - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters + :param admin_username: Required. Specifies the name of the administrator account. + :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", + "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", + "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + "sys", "test2", "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 + character :code:`
`:code:`
` **Max-length:** 20 characters. :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" + :param admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` + **Max-length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.LicenseType + :param license_type: The licenseType to use for Windows VMs. Windows_Server is used to enable + Azure Hybrid User Benefits for Windows VMs. Possible values include: "None", "Windows_Server". + :type license_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.LicenseType """ _validation = { @@ -2547,18 +3029,49 @@ class ManagedClusterWindowsProfile(Model): 'license_type': {'key': 'licenseType', 'type': 'str'}, } - def __init__(self, *, admin_username: str, admin_password: str=None, license_type=None, **kwargs) -> None: + def __init__( + self, + *, + admin_username: str, + admin_password: Optional[str] = None, + license_type: Optional[Union[str, "LicenseType"]] = None, + **kwargs + ): super(ManagedClusterWindowsProfile, self).__init__(**kwargs) self.admin_username = admin_username self.admin_password = admin_password self.license_type = license_type -class OperationValue(Model): +class OperationListResult(msrest.serialization.Model): + """The List Compute Operation operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of compute operations. + :vartype value: list[~azure.mgmt.containerservice.v2020_12_01.models.OperationValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationValue]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + + +class OperationValue(msrest.serialization.Model): """Describes the properties of a Compute Operation value. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar origin: The origin of the compute operation. :vartype origin: str @@ -2592,7 +3105,10 @@ class OperationValue(Model): 'provider': {'key': 'display.provider', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(OperationValue, self).__init__(**kwargs) self.origin = None self.name = None @@ -2602,11 +3118,11 @@ def __init__(self, **kwargs) -> None: self.provider = None -class PowerState(Model): +class PowerState(msrest.serialization.Model): """Describes the Power State of the cluster. - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' + :param code: Tells whether the cluster is Running or Stopped. Possible values include: + "Running", "Stopped". :type code: str or ~azure.mgmt.containerservice.v2020_12_01.models.Code """ @@ -2614,15 +3130,20 @@ class PowerState(Model): 'code': {'key': 'code', 'type': 'str'}, } - def __init__(self, *, code=None, **kwargs) -> None: + def __init__( + self, + *, + code: Optional[Union[str, "Code"]] = None, + **kwargs + ): super(PowerState, self).__init__(**kwargs) self.code = code -class PrivateEndpoint(Model): +class PrivateEndpoint(msrest.serialization.Model): """Private endpoint which a connection belongs to. - :param id: The resource Id for private endpoint + :param id: The resource Id for private endpoint. :type id: str """ @@ -2630,18 +3151,20 @@ class PrivateEndpoint(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, *, id: str=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): super(PrivateEndpoint, self).__init__(**kwargs) self.id = id -class PrivateEndpointConnection(Model): +class PrivateEndpointConnection(msrest.serialization.Model): """A private endpoint connection. - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The ID of the private endpoint connection. :vartype id: str @@ -2649,16 +3172,14 @@ class PrivateEndpointConnection(Model): :vartype name: str :ivar type: The resource type. :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' + :ivar provisioning_state: The current provisioning state. Possible values include: "Succeeded", + "Creating", "Deleting", "Failed". :vartype provisioning_state: str or ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnectionProvisioningState :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. + :type private_endpoint: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. :type private_link_service_connection_state: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkServiceConnectionState """ @@ -2668,7 +3189,6 @@ class PrivateEndpointConnection(Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, } _attribute_map = { @@ -2680,7 +3200,13 @@ class PrivateEndpointConnection(Model): 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, } - def __init__(self, *, private_link_service_connection_state, private_endpoint=None, **kwargs) -> None: + def __init__( + self, + *, + private_endpoint: Optional["PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + **kwargs + ): super(PrivateEndpointConnection, self).__init__(**kwargs) self.id = None self.name = None @@ -2690,28 +3216,31 @@ def __init__(self, *, private_link_service_connection_state, private_endpoint=No self.private_link_service_connection_state = private_link_service_connection_state -class PrivateEndpointConnectionListResult(Model): +class PrivateEndpointConnectionListResult(msrest.serialization.Model): """A list of private endpoint connections. :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection] + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection] """ _attribute_map = { 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, } - def __init__(self, *, value=None, **kwargs) -> None: + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnection"]] = None, + **kwargs + ): super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) self.value = value -class PrivateLinkResource(Model): +class PrivateLinkResource(msrest.serialization.Model): """A private link resource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :param id: The ID of the private link resource. :type id: str @@ -2721,10 +3250,10 @@ class PrivateLinkResource(Model): :type type: str :param group_id: The group ID of the resource. :type group_id: str - :param required_members: RequiredMembers of the resource + :param required_members: RequiredMembers of the resource. :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. + :ivar private_link_service_id: The private link service ID of the resource, this field is + exposed only to NRP internally. :vartype private_link_service_id: str """ @@ -2741,7 +3270,16 @@ class PrivateLinkResource(Model): 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, } - def __init__(self, *, id: str=None, name: str=None, type: str=None, group_id: str=None, required_members=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + group_id: Optional[str] = None, + required_members: Optional[List[str]] = None, + **kwargs + ): super(PrivateLinkResource, self).__init__(**kwargs) self.id = id self.name = name @@ -2751,30 +3289,33 @@ def __init__(self, *, id: str=None, name: str=None, type: str=None, group_id: st self.private_link_service_id = None -class PrivateLinkResourcesListResult(Model): +class PrivateLinkResourcesListResult(msrest.serialization.Model): """A list of private link resources. :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource] + :type value: list[~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource] """ _attribute_map = { 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, } - def __init__(self, *, value=None, **kwargs) -> None: + def __init__( + self, + *, + value: Optional[List["PrivateLinkResource"]] = None, + **kwargs + ): super(PrivateLinkResourcesListResult, self).__init__(**kwargs) self.value = value -class PrivateLinkServiceConnectionState(Model): +class PrivateLinkServiceConnectionState(msrest.serialization.Model): """The state of a private link service connection. - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2020_12_01.models.ConnectionStatus + :param status: The private link service connection status. Possible values include: "Pending", + "Approved", "Rejected", "Disconnected". + :type status: str or ~azure.mgmt.containerservice.v2020_12_01.models.ConnectionStatus :param description: The private link service connection description. :type description: str """ @@ -2784,13 +3325,19 @@ class PrivateLinkServiceConnectionState(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, *, status=None, description: str=None, **kwargs) -> None: + def __init__( + self, + *, + status: Optional[Union[str, "ConnectionStatus"]] = None, + description: Optional[str] = None, + **kwargs + ): super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) self.status = status self.description = description -class ResourceReference(Model): +class ResourceReference(msrest.serialization.Model): """A reference to an Azure resource. :param id: The fully qualified Azure resource id. @@ -2801,18 +3348,22 @@ class ResourceReference(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, *, id: str=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): super(ResourceReference, self).__init__(**kwargs) self.id = id -class SysctlConfig(Model): +class SysctlConfig(msrest.serialization.Model): """Sysctl settings for Linux agent nodes. :param net_core_somaxconn: Sysctl setting net.core.somaxconn. :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. + :param net_core_netdev_max_backlog: Sysctl setting net.core.netdev_max_backlog. :type net_core_netdev_max_backlog: int :param net_core_rmem_default: Sysctl setting net.core.rmem_default. :type net_core_rmem_default: int @@ -2824,45 +3375,33 @@ class SysctlConfig(Model): :type net_core_wmem_max: int :param net_core_optmem_max: Sysctl setting net.core.optmem_max. :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. + :param net_ipv4_tcp_max_syn_backlog: Sysctl setting net.ipv4.tcp_max_syn_backlog. :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. + :param net_ipv4_tcp_max_tw_buckets: Sysctl setting net.ipv4.tcp_max_tw_buckets. :type net_ipv4_tcp_max_tw_buckets: int :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. + :param net_ipv4_tcp_keepalive_time: Sysctl setting net.ipv4.tcp_keepalive_time. :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. + :param net_ipv4_tcp_keepalive_probes: Sysctl setting net.ipv4.tcp_keepalive_probes. :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. + :param net_ipv4_tcpkeepalive_intvl: Sysctl setting net.ipv4.tcp_keepalive_intvl. :type net_ipv4_tcpkeepalive_intvl: int :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. + :param net_ipv4_ip_local_port_range: Sysctl setting net.ipv4.ip_local_port_range. :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. + :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting net.ipv4.neigh.default.gc_thresh1. :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. + :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting net.ipv4.neigh.default.gc_thresh2. :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. + :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting net.ipv4.neigh.default.gc_thresh3. :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. + :param net_netfilter_nf_conntrack_max: Sysctl setting net.netfilter.nf_conntrack_max. :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. + :param net_netfilter_nf_conntrack_buckets: Sysctl setting net.netfilter.nf_conntrack_buckets. :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. + :param fs_inotify_max_user_watches: Sysctl setting fs.inotify.max_user_watches. :type fs_inotify_max_user_watches: int :param fs_file_max: Sysctl setting fs.file-max. :type fs_file_max: int @@ -2911,7 +3450,39 @@ class SysctlConfig(Model): 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, } - def __init__(self, *, net_core_somaxconn: int=None, net_core_netdev_max_backlog: int=None, net_core_rmem_default: int=None, net_core_rmem_max: int=None, net_core_wmem_default: int=None, net_core_wmem_max: int=None, net_core_optmem_max: int=None, net_ipv4_tcp_max_syn_backlog: int=None, net_ipv4_tcp_max_tw_buckets: int=None, net_ipv4_tcp_fin_timeout: int=None, net_ipv4_tcp_keepalive_time: int=None, net_ipv4_tcp_keepalive_probes: int=None, net_ipv4_tcpkeepalive_intvl: int=None, net_ipv4_tcp_tw_reuse: bool=None, net_ipv4_ip_local_port_range: str=None, net_ipv4_neigh_default_gc_thresh1: int=None, net_ipv4_neigh_default_gc_thresh2: int=None, net_ipv4_neigh_default_gc_thresh3: int=None, net_netfilter_nf_conntrack_max: int=None, net_netfilter_nf_conntrack_buckets: int=None, fs_inotify_max_user_watches: int=None, fs_file_max: int=None, fs_aio_max_nr: int=None, fs_nr_open: int=None, kernel_threads_max: int=None, vm_max_map_count: int=None, vm_swappiness: int=None, vm_vfs_cache_pressure: int=None, **kwargs) -> None: + def __init__( + self, + *, + net_core_somaxconn: Optional[int] = None, + net_core_netdev_max_backlog: Optional[int] = None, + net_core_rmem_default: Optional[int] = None, + net_core_rmem_max: Optional[int] = None, + net_core_wmem_default: Optional[int] = None, + net_core_wmem_max: Optional[int] = None, + net_core_optmem_max: Optional[int] = None, + net_ipv4_tcp_max_syn_backlog: Optional[int] = None, + net_ipv4_tcp_max_tw_buckets: Optional[int] = None, + net_ipv4_tcp_fin_timeout: Optional[int] = None, + net_ipv4_tcp_keepalive_time: Optional[int] = None, + net_ipv4_tcp_keepalive_probes: Optional[int] = None, + net_ipv4_tcpkeepalive_intvl: Optional[int] = None, + net_ipv4_tcp_tw_reuse: Optional[bool] = None, + net_ipv4_ip_local_port_range: Optional[str] = None, + net_ipv4_neigh_default_gc_thresh1: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh2: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh3: Optional[int] = None, + net_netfilter_nf_conntrack_max: Optional[int] = None, + net_netfilter_nf_conntrack_buckets: Optional[int] = None, + fs_inotify_max_user_watches: Optional[int] = None, + fs_file_max: Optional[int] = None, + fs_aio_max_nr: Optional[int] = None, + fs_nr_open: Optional[int] = None, + kernel_threads_max: Optional[int] = None, + vm_max_map_count: Optional[int] = None, + vm_swappiness: Optional[int] = None, + vm_vfs_cache_pressure: Optional[int] = None, + **kwargs + ): super(SysctlConfig, self).__init__(**kwargs) self.net_core_somaxconn = net_core_somaxconn self.net_core_netdev_max_backlog = net_core_netdev_max_backlog @@ -2943,27 +3514,24 @@ def __init__(self, *, net_core_somaxconn: int=None, net_core_netdev_max_backlog: self.vm_vfs_cache_pressure = vm_vfs_cache_pressure -class SystemData(Model): +class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. :param created_by: The identity that created the resource. :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or - ~azure.mgmt.containerservice.v2020_12_01.models.CreatedByType + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.CreatedByType :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime + :type created_at: ~datetime.datetime :param last_modified_by: The identity that last modified the resource. :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". :type last_modified_by_type: str or ~azure.mgmt.containerservice.v2020_12_01.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. - :type last_modified_at: datetime + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime """ _attribute_map = { @@ -2975,7 +3543,17 @@ class SystemData(Model): 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, } - def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): super(SystemData, self).__init__(**kwargs) self.created_by = created_by self.created_by_type = created_by_type @@ -2985,10 +3563,10 @@ def __init__(self, *, created_by: str=None, created_by_type=None, created_at=Non self.last_modified_at = last_modified_at -class TagsObject(Model): +class TagsObject(msrest.serialization.Model): """Tags object for patch operations. - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -2996,16 +3574,21 @@ class TagsObject(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, tags=None, **kwargs) -> None: + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): super(TagsObject, self).__init__(**kwargs) self.tags = tags -class TimeInWeek(Model): +class TimeInWeek(msrest.serialization.Model): """Time in a week. - :param day: A day in a week. Possible values include: 'Sunday', 'Monday', - 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' + :param day: A day in a week. Possible values include: "Sunday", "Monday", "Tuesday", + "Wednesday", "Thursday", "Friday", "Saturday". :type day: str or ~azure.mgmt.containerservice.v2020_12_01.models.WeekDay :param hour_slots: hour slots in a day. :type hour_slots: list[int] @@ -3016,19 +3599,25 @@ class TimeInWeek(Model): 'hour_slots': {'key': 'hourSlots', 'type': '[int]'}, } - def __init__(self, *, day=None, hour_slots=None, **kwargs) -> None: + def __init__( + self, + *, + day: Optional[Union[str, "WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs + ): super(TimeInWeek, self).__init__(**kwargs) self.day = day self.hour_slots = hour_slots -class TimeSpan(Model): +class TimeSpan(msrest.serialization.Model): """The time span with start and end properties. - :param start: The start of a time span - :type start: datetime - :param end: The end of a time span - :type end: datetime + :param start: The start of a time span. + :type start: ~datetime.datetime + :param end: The end of a time span. + :type end: ~datetime.datetime """ _attribute_map = { @@ -3036,7 +3625,13 @@ class TimeSpan(Model): 'end': {'key': 'end', 'type': 'iso-8601'}, } - def __init__(self, *, start=None, end=None, **kwargs) -> None: + def __init__( + self, + *, + start: Optional[datetime.datetime] = None, + end: Optional[datetime.datetime] = None, + **kwargs + ): super(TimeSpan, self).__init__(**kwargs) self.start = start self.end = end diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_paged_models.py deleted file mode 100644 index 1abf8f1b7a5..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/models/_paged_models.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class MaintenanceConfigurationPaged(Paged): - """ - A paging container for iterating over a list of :class:`MaintenanceConfiguration ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MaintenanceConfiguration]'} - } - - def __init__(self, *args, **kwargs): - - super(MaintenanceConfigurationPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/__init__.py old mode 100644 new mode 100755 index d7bfa3f00fe..3942e0ca6a0 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/__init__.py @@ -1,12 +1,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from ._operations import Operations diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_agent_pools_operations.py old mode 100644 new mode 100755 index 82e2b27e7ae..d5e36d9ff13 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_agent_pools_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_agent_pools_operations.py @@ -1,127 +1,141 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class AgentPoolsOperations(object): """AgentPoolsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-12-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config + self._config = config def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AgentPoolListResult"] """Gets a list of agent pools in the specified managed cluster. - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. + Gets a list of agent pools in the specified managed cluster. The operation returns properties + of each agent pool. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPoolListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('AgentPoolListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} # type: ignore def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPool" """Gets the agent pool. - Gets the details of the agent pool by managed cluster and resource - group. + Gets the details of the agent pool by managed cluster and resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -129,115 +143,122 @@ def get( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPool, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPool + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AgentPool', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + parameters, # type: "_models.AgentPool" + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPool" + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.create_or_update.metadata['url'] + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AgentPool') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AgentPool', pipeline_response) + if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AgentPool', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + parameters, # type: "_models.AgentPool" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AgentPool"] """Creates or updates an agent pool. Creates or updates an agent pool in the specified managed cluster. @@ -248,92 +269,121 @@ def create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Create or Update an agent pool operation. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.delete.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Deletes an agent pool. Deletes the agent pool in the specified managed cluster. @@ -344,46 +394,72 @@ def delete( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPoolUpgradeProfile" """Gets upgrade profile for an agent pool. - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. + Gets the details of the upgrade profile for an agent pool with a specified resource group and + managed cluster name. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -391,63 +467,60 @@ def get_upgrade_profile( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.get_upgrade_profile.metadata['url'] + url = self.get_upgrade_profile.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) + deserialized = self._deserialize('AgentPoolUpgradeProfile', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} # type: ignore def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPoolAvailableVersions" """Gets a list of supported versions for the specified agent pool. Gets a list of supported versions for the specified agent pool. @@ -456,109 +529,112 @@ def get_available_agent_pool_versions( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolAvailableVersions, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.AgentPoolAvailableVersions + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolAvailableVersions"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] + url = self.get_available_agent_pool_versions.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) + deserialized = self._deserialize('AgentPoolAvailableVersions', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} - + get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} # type: ignore def _upgrade_node_image_version_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.AgentPool"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AgentPool"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.upgrade_node_image_version.metadata['url'] + url = self._upgrade_node_image_version_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None - if response.status_code == 202: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AgentPool', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def upgrade_node_image_version( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + _upgrade_node_image_version_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore + + def begin_upgrade_node_image_version( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AgentPool"] """Upgrade node image version of an agent pool to the latest. Upgrade node image version of an agent pool to the latest. @@ -569,42 +645,59 @@ def upgrade_node_image_version( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_12_01.models.AgentPool]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._upgrade_node_image_version_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._upgrade_node_image_version_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_maintenance_configurations_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_maintenance_configurations_operations.py old mode 100644 new mode 100755 index 3a73520450d..0d7f59ca557 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_maintenance_configurations_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_maintenance_configurations_operations.py @@ -1,129 +1,139 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class MaintenanceConfigurationsOperations(object): """MaintenanceConfigurationsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-12-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config + self._config = config def list_by_managed_cluster( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of maintenance configurations in the specified managed - cluster. + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.MaintenanceConfigurationListResult"] + """Gets a list of maintenance configurations in the specified managed cluster. - Gets a list of maintenance configurations in the specified managed - cluster. The operation returns properties of each maintenance - configuration. + Gets a list of maintenance configurations in the specified managed cluster. The operation + returns properties of each maintenance configuration. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of MaintenanceConfiguration - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfigurationPaged[~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MaintenanceConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_managed_cluster.metadata['url'] + url = self.list_by_managed_cluster.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('MaintenanceConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.MaintenanceConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list_by_managed_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'} + return ItemPaged( + get_next, extract_data + ) + list_by_managed_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'} # type: ignore def get( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + config_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MaintenanceConfiguration" """Gets the maintenance configuration. - Gets the details of maintenance configurations by managed cluster and - resource group. + Gets the details of maintenance configurations by managed cluster and resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -131,120 +141,138 @@ def get( :type resource_name: str :param config_name: The name of the maintenance configuration. :type config_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MaintenanceConfiguration or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') + 'configName': self._serialize.url("config_name", config_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore + def create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + config_name, # type: str + parameters, # type: "_models.MaintenanceConfiguration" + **kwargs # type: Any + ): + # type: (...) -> "_models.MaintenanceConfiguration" + """Creates or updates a maintenance configurations. - def _create_or_update_initial( - self, resource_group_name, resource_name, config_name, time_in_week=None, not_allowed_time=None, custom_headers=None, raw=False, **operation_config): - parameters = models.MaintenanceConfiguration(time_in_week=time_in_week, not_allowed_time=not_allowed_time) + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :param parameters: Parameters supplied to the Create or Update a default maintenance + configuration. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') + 'configName': self._serialize.url("config_name", config_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'MaintenanceConfiguration') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'MaintenanceConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore - def create_or_update( - self, resource_group_name, resource_name, config_name, time_in_week=None, not_allowed_time=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a maintenance configurations. + def delete( + self, + resource_group_name, # type: str + resource_name, # type: str + config_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a maintenance configuration. - Creates or updates a maintenance configuration in the specified managed - cluster. + Deletes the maintenance configuration in the specified managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -252,136 +280,46 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. :type config_name: str - :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2020_12_01.models.TimeInWeek] - :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2020_12_01.models.TimeSpan] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - MaintenanceConfiguration or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_12_01.models.MaintenanceConfiguration]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - time_in_week=time_in_week, - not_allowed_time=not_allowed_time, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} - + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" - def _delete_initial( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') + 'configName': self._serialize.url("config_name", config_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a maintenance configuration. - - Deletes the maintenance configuration in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param config_name: The name of the maintenance configuration. - :type config_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_managed_clusters_operations.py old mode 100644 new mode 100755 index d8060fe2f32..e424b772204 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_managed_clusters_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_managed_clusters_operations.py @@ -1,747 +1,768 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class ManagedClustersOperations(object): """ManagedClustersOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-12-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config + self._config = config def list( - self, custom_headers=None, raw=False, **operation_config): + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedClusterListResult"] """Gets a list of managed clusters in the specified subscription. - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] - :raises: :class:`CloudError` + Gets a list of managed clusters in the specified subscription. The operation returns properties + of each managed cluster. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedClusterListResult"] + """Lists managed clusters in the specified subscription and resource group. - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. + Lists managed clusters in the specified subscription and resource group. The operation returns + properties of each managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - return response + return pipeline_response - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedClusterUpgradeProfile" """Gets upgrade profile for a managed cluster. - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. + Gets the details of the upgrade profile for a managed cluster with a specified resource group + and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.get_upgrade_profile.metadata['url'] + url = self.get_upgrade_profile.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) + deserialized = self._deserialize('ManagedClusterUpgradeProfile', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} # type: ignore def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + role_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedClusterAccessProfile" """Gets an access profile of a managed cluster. - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. **WARNING**: This API - will be deprecated. Instead use - [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) - or - [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) - . + Gets the accessProfile for the specified role name of the managed cluster with a specified + resource group and name. **WARNING**\ : This API will be deprecated. Instead use + `ListClusterUserCredentials + `_ or + `ListClusterAdminCredentials + `_ . :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. + :param role_name: The name of the role for managed cluster accessProfile resource. :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAccessProfile + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterAccessProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.get_access_profile.metadata['url'] + url = self.get_access_profile.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') + 'roleName': self._serialize.url("role_name", role_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) + deserialized = self._deserialize('ManagedClusterAccessProfile', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} + get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} # type: ignore def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" """Gets cluster admin credential of a managed cluster. - Gets cluster admin credential of the managed cluster with a specified - resource group and name. + Gets cluster admin credential of the managed cluster with a specified resource group and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] + url = self.list_cluster_admin_credentials.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) + deserialized = self._deserialize('CredentialResults', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} + list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} # type: ignore def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" """Gets cluster user credential of a managed cluster. - Gets cluster user credential of the managed cluster with a specified - resource group and name. + Gets cluster user credential of the managed cluster with a specified resource group and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] + url = self.list_cluster_user_credentials.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) + deserialized = self._deserialize('CredentialResults', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} + list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} # type: ignore def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" """Gets cluster monitoring user credential of a managed cluster. - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. + Gets cluster monitoring user credential of the managed cluster with a specified resource group + and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] + url = self.list_cluster_monitoring_user_credentials.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) + deserialized = self._deserialize('CredentialResults', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} + list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} # type: ignore def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" """Gets a managed cluster. - Gets the details of the managed cluster with a specified resource group - and name. + Gets the details of the managed cluster with a specified resource group and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedCluster, or the result of cls(response) :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedCluster" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.create_or_update.metadata['url'] + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedCluster') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) + if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedCluster" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ManagedCluster"] """Creates or updates a managed cluster. - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. + Creates or updates a managed cluster with the specified configuration for agents and Kubernetes + version. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.update_tags.metadata['url'] + url = self._update_tags_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def begin_update_tags( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ManagedCluster"] """Updates tags on a managed cluster. Updates a managed cluster with the specified tags. @@ -750,88 +771,116 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2020_12_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.delete.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Deletes a managed cluster. Deletes the managed cluster with a specified resource group and name. @@ -840,85 +889,117 @@ def delete( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterServicePrincipalProfile" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.reset_service_principal_profile.metadata['url'] + url = self._reset_service_principal_profile_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_service_principal_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + def begin_reset_service_principal_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterServicePrincipalProfile" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Reset Service Principal Profile of a managed cluster. Update the service principal Profile for a managed cluster. @@ -927,90 +1008,121 @@ def reset_service_principal_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a + Managed Cluster. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterServicePrincipalProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_service_principal_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterAADProfile" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.reset_aad_profile.metadata['url'] + url = self._reset_aad_profile_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_aad_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + def begin_reset_aad_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterAADProfile" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Reset AAD Profile of a managed cluster. Update the AAD Profile for a managed cluster. @@ -1019,84 +1131,114 @@ def reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed + Cluster. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.ManagedClusterAADProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_aad_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] + url = self._rotate_cluster_certificates_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + if cls: + return cls(pipeline_response, None, {}) - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + _rotate_cluster_certificates_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore + + def begin_rotate_cluster_certificates( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Rotate certificates of a managed cluster. Rotate certificates of a managed cluster. @@ -1105,79 +1247,110 @@ def rotate_cluster_certificates( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._rotate_cluster_certificates_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore def _stop_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.stop.metadata['url'] + url = self._stop_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore - def stop( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + def begin_stop( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Stop Managed Cluster. Stops a Running Managed Cluster. @@ -1186,79 +1359,110 @@ def stop( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore def _start_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.start.metadata['url'] + url = self._start_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore - def start( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + def begin_start( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Start Managed Cluster. Starts a Stopped Managed Cluster. @@ -1267,35 +1471,54 @@ def start( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_operations.py old mode 100644 new mode 100755 index b2d2fa8b264..d49593528c7 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_operations.py @@ -1,102 +1,109 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class Operations(object): """Operations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-12-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config + self._config = config def list( - self, custom_headers=None, raw=False, **operation_config): + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OperationListResult"] """Gets a list of compute operations. - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2020_12_01.models.OperationValue] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2020_12_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] - + url = self.list.metadata['url'] # type: ignore # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_private_endpoint_connections_operations.py old mode 100644 new mode 100755 index 7399464c724..2fafddf9052 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_private_endpoint_connections_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_private_endpoint_connections_operations.py @@ -1,185 +1,187 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class PrivateEndpointConnectionsOperations(object): """PrivateEndpointConnectionsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-12-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config + self._config = config def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private endpoint connections in the specified managed - cluster. + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnectionListResult" + """Gets a list of private endpoint connections in the specified managed cluster. - Gets a list of private endpoint connections in the specified managed - cluster. The operation returns properties of each private endpoint - connection. + Gets a list of private endpoint connections in the specified managed cluster. The operation + returns properties of each private endpoint connection. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnectionListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnectionListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnectionListResult + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionListResult', response) + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} # type: ignore def get( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" """Gets the private endpoint connection. - Gets the details of the private endpoint connection by managed cluster - and resource group. + Gets the details of the private endpoint connection by managed cluster and resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. + :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore def update( - self, resource_group_name, resource_name, private_endpoint_connection_name, private_link_service_connection_state, private_endpoint=None, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + parameters, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" """Updates a private endpoint connection. Updates a private endpoint connection in the specified managed cluster. @@ -188,161 +190,177 @@ def update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. + :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str - :param private_link_service_connection_state: A collection of - information about the state of the connection between service consumer - and provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkServiceConnectionState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpoint - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Update a private endpoint connection operation. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError """ - parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.update.metadata['url'] + url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore def _delete_initial( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.delete.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Deletes a private endpoint connection. - Deletes the private endpoint connection in the specified managed - cluster. + Deletes the private endpoint connection in the specified managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. + :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_private_link_resources_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_private_link_resources_operations.py old mode 100644 new mode 100755 index 90d19cc64af..e61301522a1 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_private_link_resources_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_private_link_resources_operations.py @@ -1,106 +1,107 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class PrivateLinkResourcesOperations(object): """PrivateLinkResourcesOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-12-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config + self._config = config def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResourcesListResult" """Gets a list of private link resources in the specified managed cluster. - Gets a list of private link resources in the specified managed cluster. - The operation returns properties of each private link resource. + Gets a list of private link resources in the specified managed cluster. The operation returns + properties of each private link resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResourcesListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResourcesListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResourcesListResult + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + accept = "application/json" + # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesListResult', response) + deserialized = self._deserialize('PrivateLinkResourcesListResult', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_resolve_private_link_service_id_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_resolve_private_link_service_id_operations.py old mode 100644 new mode 100755 index 04ef59705ae..c89c87d67a7 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_resolve_private_link_service_id_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/operations/_resolve_private_link_service_id_operations.py @@ -1,46 +1,57 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class ResolvePrivateLinkServiceIdOperations(object): """ResolvePrivateLinkServiceIdOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-12-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-12-01" - - self.config = config + self._config = config def post( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.PrivateLinkResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResource" """Gets the private link service ID for the specified managed cluster. Gets the private link service ID the specified managed cluster. @@ -49,64 +60,56 @@ def post( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param parameters: Parameters (name, groupId) supplied in order to - resolve a private link service ID. - :type parameters: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :param parameters: Parameters (name, groupId) supplied in order to resolve a private link + service ID. + :type parameters: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_12_01.models.PrivateLinkResource + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.post.metadata['url'] + url = self.post.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateLinkResource') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateLinkResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResource', response) + deserialized = self._deserialize('PrivateLinkResource', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} + post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/version.py deleted file mode 100644 index 22afdcf8c3b..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_12_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2020-12-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/_container_service_client.py deleted file mode 100644 index 7fed16ccf0e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/_container_service_client.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import MaintenanceConfigurationsOperations -from .operations import AgentPoolsOperations -from .operations import PrivateEndpointConnectionsOperations -from .operations import PrivateLinkResourcesOperations -from .operations import ResolvePrivateLinkServiceIdOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2021_02_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2021_02_01.operations.ManagedClustersOperations - :ivar maintenance_configurations: MaintenanceConfigurations operations - :vartype maintenance_configurations: azure.mgmt.containerservice.v2021_02_01.operations.MaintenanceConfigurationsOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2021_02_01.operations.AgentPoolsOperations - :ivar private_endpoint_connections: PrivateEndpointConnections operations - :vartype private_endpoint_connections: azure.mgmt.containerservice.v2021_02_01.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResources operations - :vartype private_link_resources: azure.mgmt.containerservice.v2021_02_01.operations.PrivateLinkResourcesOperations - :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceId operations - :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2021_02_01.operations.ResolvePrivateLinkServiceIdOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2021-02-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.maintenance_configurations = MaintenanceConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/__init__.py deleted file mode 100644 index 78c9a8ebc1e..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/__init__.py +++ /dev/null @@ -1,270 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import AgentPoolUpgradeSettings - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import KubeletConfig - from ._models_py3 import LinuxOSConfig - from ._models_py3 import MaintenanceConfiguration - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAddonProfileIdentity - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterAutoUpgradeProfile - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPodIdentity - from ._models_py3 import ManagedClusterPodIdentityException - from ._models_py3 import ManagedClusterPodIdentityProfile - from ._models_py3 import ManagedClusterPodIdentityProvisioningInfo - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterSKU - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import PowerState - from ._models_py3 import PrivateEndpoint - from ._models_py3 import PrivateEndpointConnection - from ._models_py3 import PrivateEndpointConnectionListResult - from ._models_py3 import PrivateLinkResource - from ._models_py3 import PrivateLinkResourcesListResult - from ._models_py3 import PrivateLinkServiceConnectionState - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import RunCommandRequest - from ._models_py3 import RunCommandResult - from ._models_py3 import SubResource - from ._models_py3 import SysctlConfig - from ._models_py3 import SystemData - from ._models_py3 import TagsObject - from ._models_py3 import TimeInWeek - from ._models_py3 import TimeSpan - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import AgentPoolUpgradeSettings - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import KubeletConfig - from ._models import LinuxOSConfig - from ._models import MaintenanceConfiguration - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterAutoUpgradeProfile - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPodIdentity - from ._models import ManagedClusterPodIdentityException - from ._models import ManagedClusterPodIdentityProfile - from ._models import ManagedClusterPodIdentityProvisioningInfo - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterSKU - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import PowerState - from ._models import PrivateEndpoint - from ._models import PrivateEndpointConnection - from ._models import PrivateEndpointConnectionListResult - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourcesListResult - from ._models import PrivateLinkServiceConnectionState - from ._models import Resource - from ._models import ResourceReference - from ._models import RunCommandRequest - from ._models import RunCommandResult - from ._models import SubResource - from ._models import SysctlConfig - from ._models import SystemData - from ._models import TagsObject - from ._models import TimeInWeek - from ._models import TimeSpan - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import MaintenanceConfigurationPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSDiskType, - KubeletDiskType, - OSType, - AgentPoolType, - AgentPoolMode, - Code, - ScaleSetPriority, - ScaleSetEvictionPolicy, - LicenseType, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, - LoadBalancerSku, - CreatedByType, - WeekDay, - ManagedClusterPodIdentityProvisioningState, - UpgradeChannel, - Expander, - ResourceIdentityType, - ManagedClusterSKUName, - ManagedClusterSKUTier, - PrivateEndpointConnectionProvisioningState, - ConnectionStatus, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'AgentPoolUpgradeSettings', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'KubeletConfig', - 'LinuxOSConfig', - 'MaintenanceConfiguration', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAddonProfileIdentity', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterAutoUpgradeProfile', - 'ManagedClusterIdentity', - 'ManagedClusterIdentityUserAssignedIdentitiesValue', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPodIdentity', - 'ManagedClusterPodIdentityException', - 'ManagedClusterPodIdentityProfile', - 'ManagedClusterPodIdentityProvisioningInfo', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterSKU', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'PowerState', - 'PrivateEndpoint', - 'PrivateEndpointConnection', - 'PrivateEndpointConnectionListResult', - 'PrivateLinkResource', - 'PrivateLinkResourcesListResult', - 'PrivateLinkServiceConnectionState', - 'Resource', - 'ResourceReference', - 'RunCommandRequest', - 'RunCommandResult', - 'SubResource', - 'SysctlConfig', - 'SystemData', - 'TagsObject', - 'TimeInWeek', - 'TimeSpan', - 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'MaintenanceConfigurationPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSDiskType', - 'KubeletDiskType', - 'OSType', - 'AgentPoolType', - 'AgentPoolMode', - 'Code', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'LicenseType', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', - 'LoadBalancerSku', - 'CreatedByType', - 'WeekDay', - 'ManagedClusterPodIdentityProvisioningState', - 'UpgradeChannel', - 'Expander', - 'ResourceIdentityType', - 'ManagedClusterSKUName', - 'ManagedClusterSKUTier', - 'PrivateEndpointConnectionProvisioningState', - 'ConnectionStatus', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_container_service_client_enums.py deleted file mode 100644 index 7c248fbbfd8..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,357 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSDiskType(str, Enum): - - managed = "Managed" - ephemeral = "Ephemeral" - - -class KubeletDiskType(str, Enum): - - os = "OS" - temporary = "Temporary" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class AgentPoolMode(str, Enum): - - system = "System" - user = "User" - - -class Code(str, Enum): - - running = "Running" - stopped = "Stopped" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class LicenseType(str, Enum): - - none = "None" - windows_server = "Windows_Server" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class CreatedByType(str, Enum): - - user = "User" - application = "Application" - managed_identity = "ManagedIdentity" - key = "Key" - - -class WeekDay(str, Enum): - - sunday = "Sunday" - monday = "Monday" - tuesday = "Tuesday" - wednesday = "Wednesday" - thursday = "Thursday" - friday = "Friday" - saturday = "Saturday" - - -class ManagedClusterPodIdentityProvisioningState(str, Enum): - - assigned = "Assigned" - updating = "Updating" - deleting = "Deleting" - failed = "Failed" - - -class UpgradeChannel(str, Enum): - - rapid = "rapid" - stable = "stable" - patch = "patch" - none = "none" - - -class Expander(str, Enum): - - least_waste = "least-waste" - most_pods = "most-pods" - priority = "priority" - random = "random" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - none = "None" - - -class ManagedClusterSKUName(str, Enum): - - basic = "Basic" - - -class ManagedClusterSKUTier(str, Enum): - - paid = "Paid" - free = "Free" - - -class PrivateEndpointConnectionProvisioningState(str, Enum): - - succeeded = "Succeeded" - creating = "Creating" - deleting = "Deleting" - failed = "Failed" - - -class ConnectionStatus(str, Enum): - - pending = "Pending" - approved = "Approved" - rejected = "Rejected" - disconnected = "Disconnected" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_models.py deleted file mode 100644 index a2d7743e9ea..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_models.py +++ /dev/null @@ -1,3137 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_02_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'properties.kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'properties.podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'properties.nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'properties.kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'properties.linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'properties.enableEncryptionAtHost', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.os_disk_type = kwargs.get('os_disk_type', None) - self.kubelet_disk_type = kwargs.get('kubelet_disk_type', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.pod_subnet_id = kwargs.get('pod_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = None - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.power_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.node_public_ip_prefix_id = kwargs.get('node_public_ip_prefix_id', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - self.kubelet_config = kwargs.get('kubelet_config', None) - self.linux_os_config = kwargs.get('linux_os_config', None) - self.enable_encryption_at_host = kwargs.get('enable_encryption_at_host', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - self.latest_node_image_version = kwargs.get('latest_node_image_version', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = kwargs.get('max_surge', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2021_02_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2021_02_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2021_02_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2021_02_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2021_02_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2021_02_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.network_mode = kwargs.get('network_mode', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.outbound_type = kwargs.get('outbound_type', "loadBalancer") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2021_02_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class KubeletConfig(Model): - """Kubelet configurations of agent nodes. - - :param cpu_manager_policy: CPU Manager policy to use. - :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. - :type cpu_cfs_quota: bool - :param cpu_cfs_quota_period: Sets CPU CFS quota period value. - :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. - :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. - :type image_gc_low_threshold: int - :param topology_manager_policy: Topology Manager policy to use. - :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). - :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. - :type fail_swap_on: bool - :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of - container log file before it is rotated. - :type container_log_max_size_mb: int - :param container_log_max_files: The maximum number of container log files - that can be present for a container. The number must be ≥ 2. - :type container_log_max_files: int - :param pod_max_pids: The maximum number of processes per pod. - :type pod_max_pids: int - """ - - _validation = { - 'container_log_max_files': {'minimum': 2}, - } - - _attribute_map = { - 'cpu_manager_policy': {'key': 'cpuManagerPolicy', 'type': 'str'}, - 'cpu_cfs_quota': {'key': 'cpuCfsQuota', 'type': 'bool'}, - 'cpu_cfs_quota_period': {'key': 'cpuCfsQuotaPeriod', 'type': 'str'}, - 'image_gc_high_threshold': {'key': 'imageGcHighThreshold', 'type': 'int'}, - 'image_gc_low_threshold': {'key': 'imageGcLowThreshold', 'type': 'int'}, - 'topology_manager_policy': {'key': 'topologyManagerPolicy', 'type': 'str'}, - 'allowed_unsafe_sysctls': {'key': 'allowedUnsafeSysctls', 'type': '[str]'}, - 'fail_swap_on': {'key': 'failSwapOn', 'type': 'bool'}, - 'container_log_max_size_mb': {'key': 'containerLogMaxSizeMB', 'type': 'int'}, - 'container_log_max_files': {'key': 'containerLogMaxFiles', 'type': 'int'}, - 'pod_max_pids': {'key': 'podMaxPids', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(KubeletConfig, self).__init__(**kwargs) - self.cpu_manager_policy = kwargs.get('cpu_manager_policy', None) - self.cpu_cfs_quota = kwargs.get('cpu_cfs_quota', None) - self.cpu_cfs_quota_period = kwargs.get('cpu_cfs_quota_period', None) - self.image_gc_high_threshold = kwargs.get('image_gc_high_threshold', None) - self.image_gc_low_threshold = kwargs.get('image_gc_low_threshold', None) - self.topology_manager_policy = kwargs.get('topology_manager_policy', None) - self.allowed_unsafe_sysctls = kwargs.get('allowed_unsafe_sysctls', None) - self.fail_swap_on = kwargs.get('fail_swap_on', None) - self.container_log_max_size_mb = kwargs.get('container_log_max_size_mb', None) - self.container_log_max_files = kwargs.get('container_log_max_files', None) - self.pod_max_pids = kwargs.get('pod_max_pids', None) - - -class LinuxOSConfig(Model): - """OS configurations of Linux agent nodes. - - :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2021_02_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. - :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. - :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. - :type swap_file_size_mb: int - """ - - _attribute_map = { - 'sysctls': {'key': 'sysctls', 'type': 'SysctlConfig'}, - 'transparent_huge_page_enabled': {'key': 'transparentHugePageEnabled', 'type': 'str'}, - 'transparent_huge_page_defrag': {'key': 'transparentHugePageDefrag', 'type': 'str'}, - 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(LinuxOSConfig, self).__init__(**kwargs) - self.sysctls = kwargs.get('sysctls', None) - self.transparent_huge_page_enabled = kwargs.get('transparent_huge_page_enabled', None) - self.transparent_huge_page_defrag = kwargs.get('transparent_huge_page_defrag', None) - self.swap_file_size_mb = kwargs.get('swap_file_size_mb', None) - - -class MaintenanceConfiguration(SubResource): - """maintenance configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar system_data: The system meta data relating to this resource. - :vartype system_data: - ~azure.mgmt.containerservice.v2021_02_01.models.SystemData - :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2021_02_01.models.TimeInWeek] - :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2021_02_01.models.TimeSpan] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'time_in_week': {'key': 'properties.timeInWeek', 'type': '[TimeInWeek]'}, - 'not_allowed_time': {'key': 'properties.notAllowedTime', 'type': '[TimeSpan]'}, - } - - def __init__(self, **kwargs): - super(MaintenanceConfiguration, self).__init__(**kwargs) - self.system_data = None - self.time_in_week = kwargs.get('time_in_week', None) - self.not_allowed_time = kwargs.get('not_allowed_time', None) - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :param fqdn_subdomain: FQDN subdomain specified when creating private - cluster with custom private dns zone. - :type fqdn_subdomain: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy - config. - :vartype azure_portal_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAddonProfile] - :param pod_identity_profile: Profile of managed cluster pod identity. - :type pod_identity_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAADProfile - :param auto_upgrade_profile: Profile of auto upgrade configuration. - :type auto_upgrade_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - 'azure_portal_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn_subdomain': {'key': 'properties.fqdnSubdomain', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'azure_portal_fqdn': {'key': 'properties.azurePortalFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn_subdomain = kwargs.get('fqdn_subdomain', None) - self.fqdn = None - self.private_fqdn = None - self.azure_portal_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.pod_identity_profile = kwargs.get('pod_identity_profile', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.auto_upgrade_profile = kwargs.get('auto_upgrade_profile', None) - self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) - self.identity_profile = kwargs.get('identity_profile', None) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = kwargs.get('managed', None) - self.enable_azure_rbac = kwargs.get('enable_azure_rbac', None) - self.admin_group_object_ids = kwargs.get('admin_group_object_ids', None) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_02_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.os_disk_type = kwargs.get('os_disk_type', None) - self.kubelet_disk_type = kwargs.get('kubelet_disk_type', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.pod_subnet_id = kwargs.get('pod_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = None - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.power_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.node_public_ip_prefix_id = kwargs.get('node_public_ip_prefix_id', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - self.kubelet_config = kwargs.get('kubelet_config', None) - self.linux_os_config = kwargs.get('linux_os_config', None) - self.enable_encryption_at_host = kwargs.get('enable_encryption_at_host', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_02_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - :param private_dns_zone: Private dns zone mode for private cluster. - :type private_dns_zone: str - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - self.private_dns_zone = kwargs.get('private_dns_zone', None) - - -class ManagedClusterAutoUpgradeProfile(Model): - """Auto upgrade profile for a managed cluster. - - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2021_02_01.models.UpgradeChannel - """ - - _attribute_map = { - 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) - self.upgrade_channel = kwargs.get('upgrade_channel', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2021_02_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2021_02_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2021_02_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPodIdentity(Model): - """ManagedClusterPodIdentity. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity. - :type name: str - :param namespace: Required. Namespace of the pod identity. - :type namespace: str - :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2021_02_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentityProvisioningState - :ivar provisioning_info: - :vartype provisioning_info: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentityProvisioningInfo - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'identity': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_info': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'UserAssignedIdentity'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentity, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.identity = kwargs.get('identity', None) - self.provisioning_state = None - self.provisioning_info = None - - -class ManagedClusterPodIdentityException(Model): - """ManagedClusterPodIdentityException. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity exception. - :type name: str - :param namespace: Required. Namespace of the pod identity exception. - :type namespace: str - :param pod_labels: Required. Pod labels to match. - :type pod_labels: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'pod_labels': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentityException, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.pod_labels = kwargs.get('pod_labels', None) - - -class ManagedClusterPodIdentityProfile(Model): - """ManagedClusterPodIdentityProfile. - - :param enabled: Whether the pod identity addon is enabled. - :type enabled: bool - :param allow_network_plugin_kubenet: Customer consent for enabling AAD pod - identity addon in cluster using Kubenet network plugin. - :type allow_network_plugin_kubenet: bool - :param user_assigned_identities: User assigned pod identity settings. - :type user_assigned_identities: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. - :type user_assigned_identity_exceptions: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentityException] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'allow_network_plugin_kubenet': {'key': 'allowNetworkPluginKubenet', 'type': 'bool'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '[ManagedClusterPodIdentity]'}, - 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.allow_network_plugin_kubenet = kwargs.get('allow_network_plugin_kubenet', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - self.user_assigned_identity_exceptions = kwargs.get('user_assigned_identity_exceptions', None) - - -class ManagedClusterPodIdentityProvisioningInfo(Model): - """ManagedClusterPodIdentityProvisioningInfo. - - :param error: Pod identity assignment error (if any). - :type error: ~azure.mgmt.containerservice.v2021_02_01.models.CloudError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudError'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'priority', 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2021_02_01.models.Expander - :param max_empty_bulk_delete: - :type max_empty_bulk_delete: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - :param max_node_provision_time: - :type max_node_provision_time: str - :param max_total_unready_percentage: - :type max_total_unready_percentage: str - :param new_pod_scale_up_delay: - :type new_pod_scale_up_delay: str - :param ok_total_unready_count: - :type ok_total_unready_count: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param skip_nodes_with_local_storage: - :type skip_nodes_with_local_storage: str - :param skip_nodes_with_system_pods: - :type skip_nodes_with_system_pods: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'expander': {'key': 'expander', 'type': 'str'}, - 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - 'max_node_provision_time': {'key': 'max-node-provision-time', 'type': 'str'}, - 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, - 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, - 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, - 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) - self.expander = kwargs.get('expander', None) - self.max_empty_bulk_delete = kwargs.get('max_empty_bulk_delete', None) - self.max_graceful_termination_sec = kwargs.get('max_graceful_termination_sec', None) - self.max_node_provision_time = kwargs.get('max_node_provision_time', None) - self.max_total_unready_percentage = kwargs.get('max_total_unready_percentage', None) - self.new_pod_scale_up_delay = kwargs.get('new_pod_scale_up_delay', None) - self.ok_total_unready_count = kwargs.get('ok_total_unready_count', None) - self.scan_interval = kwargs.get('scan_interval', None) - self.scale_down_delay_after_add = kwargs.get('scale_down_delay_after_add', None) - self.scale_down_delay_after_delete = kwargs.get('scale_down_delay_after_delete', None) - self.scale_down_delay_after_failure = kwargs.get('scale_down_delay_after_failure', None) - self.scale_down_unneeded_time = kwargs.get('scale_down_unneeded_time', None) - self.scale_down_unready_time = kwargs.get('scale_down_unready_time', None) - self.scale_down_utilization_threshold = kwargs.get('scale_down_utilization_threshold', None) - self.skip_nodes_with_local_storage = kwargs.get('skip_nodes_with_local_storage', None) - self.skip_nodes_with_system_pods = kwargs.get('skip_nodes_with_system_pods', None) - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" - :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.LicenseType - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.license_type = kwargs.get('license_type', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class PowerState(Model): - """Describes the Power State of the cluster. - - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' - :type code: str or ~azure.mgmt.containerservice.v2021_02_01.models.Code - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PowerState, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkResource(Model): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The ID of the private link resource. - :type id: str - :param name: The name of the private link resource. - :type name: str - :param type: The resource type. - :type type: str - :param group_id: The group ID of the resource. - :type group_id: str - :param required_members: RequiredMembers of the resource - :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. - :vartype private_link_service_id: str - """ - - _validation = { - 'private_link_service_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.group_id = kwargs.get('group_id', None) - self.required_members = kwargs.get('required_members', None) - self.private_link_service_id = None - - -class PrivateLinkResourcesListResult(Model): - """A list of private link resources. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResourcesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class RunCommandRequest(Model): - """run command request. - - :param command: command to run. - :type command: str - :param context: base64 encoded zip file, contains files required by the - command - :type context: str - :param cluster_token: AuthToken issued for AKS AAD Server App. - :type cluster_token: str - """ - - _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'cluster_token': {'key': 'clusterToken', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandRequest, self).__init__(**kwargs) - self.command = kwargs.get('command', None) - self.context = kwargs.get('context', None) - self.cluster_token = kwargs.get('cluster_token', None) - - -class RunCommandResult(Model): - """run command result. - - :param id: command id. - :type id: str - :param provisioning_state: provisioning State - :type provisioning_state: str - :param exit_code: exit code of the command - :type exit_code: int - :param started_at: time when the command started. - :type started_at: datetime - :param finished_at: time when the command finished. - :type finished_at: datetime - :param logs: command output. - :type logs: str - :param reason: explain why provisioningState is set to failed (if so). - :type reason: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'exit_code': {'key': 'properties.exitCode', 'type': 'int'}, - 'started_at': {'key': 'properties.startedAt', 'type': 'iso-8601'}, - 'finished_at': {'key': 'properties.finishedAt', 'type': 'iso-8601'}, - 'logs': {'key': 'properties.logs', 'type': 'str'}, - 'reason': {'key': 'properties.reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandResult, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.exit_code = kwargs.get('exit_code', None) - self.started_at = kwargs.get('started_at', None) - self.finished_at = kwargs.get('finished_at', None) - self.logs = kwargs.get('logs', None) - self.reason = kwargs.get('reason', None) - - -class SysctlConfig(Model): - """Sysctl settings for Linux agent nodes. - - :param net_core_somaxconn: Sysctl setting net.core.somaxconn. - :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. - :type net_core_netdev_max_backlog: int - :param net_core_rmem_default: Sysctl setting net.core.rmem_default. - :type net_core_rmem_default: int - :param net_core_rmem_max: Sysctl setting net.core.rmem_max. - :type net_core_rmem_max: int - :param net_core_wmem_default: Sysctl setting net.core.wmem_default. - :type net_core_wmem_default: int - :param net_core_wmem_max: Sysctl setting net.core.wmem_max. - :type net_core_wmem_max: int - :param net_core_optmem_max: Sysctl setting net.core.optmem_max. - :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. - :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. - :type net_ipv4_tcp_max_tw_buckets: int - :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. - :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. - :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. - :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. - :type net_ipv4_tcpkeepalive_intvl: int - :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. - :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. - :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. - :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. - :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. - :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. - :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. - :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. - :type fs_inotify_max_user_watches: int - :param fs_file_max: Sysctl setting fs.file-max. - :type fs_file_max: int - :param fs_aio_max_nr: Sysctl setting fs.aio-max-nr. - :type fs_aio_max_nr: int - :param fs_nr_open: Sysctl setting fs.nr_open. - :type fs_nr_open: int - :param kernel_threads_max: Sysctl setting kernel.threads-max. - :type kernel_threads_max: int - :param vm_max_map_count: Sysctl setting vm.max_map_count. - :type vm_max_map_count: int - :param vm_swappiness: Sysctl setting vm.swappiness. - :type vm_swappiness: int - :param vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. - :type vm_vfs_cache_pressure: int - """ - - _attribute_map = { - 'net_core_somaxconn': {'key': 'netCoreSomaxconn', 'type': 'int'}, - 'net_core_netdev_max_backlog': {'key': 'netCoreNetdevMaxBacklog', 'type': 'int'}, - 'net_core_rmem_default': {'key': 'netCoreRmemDefault', 'type': 'int'}, - 'net_core_rmem_max': {'key': 'netCoreRmemMax', 'type': 'int'}, - 'net_core_wmem_default': {'key': 'netCoreWmemDefault', 'type': 'int'}, - 'net_core_wmem_max': {'key': 'netCoreWmemMax', 'type': 'int'}, - 'net_core_optmem_max': {'key': 'netCoreOptmemMax', 'type': 'int'}, - 'net_ipv4_tcp_max_syn_backlog': {'key': 'netIpv4TcpMaxSynBacklog', 'type': 'int'}, - 'net_ipv4_tcp_max_tw_buckets': {'key': 'netIpv4TcpMaxTwBuckets', 'type': 'int'}, - 'net_ipv4_tcp_fin_timeout': {'key': 'netIpv4TcpFinTimeout', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_time': {'key': 'netIpv4TcpKeepaliveTime', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_probes': {'key': 'netIpv4TcpKeepaliveProbes', 'type': 'int'}, - 'net_ipv4_tcpkeepalive_intvl': {'key': 'netIpv4TcpkeepaliveIntvl', 'type': 'int'}, - 'net_ipv4_tcp_tw_reuse': {'key': 'netIpv4TcpTwReuse', 'type': 'bool'}, - 'net_ipv4_ip_local_port_range': {'key': 'netIpv4IpLocalPortRange', 'type': 'str'}, - 'net_ipv4_neigh_default_gc_thresh1': {'key': 'netIpv4NeighDefaultGcThresh1', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh2': {'key': 'netIpv4NeighDefaultGcThresh2', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh3': {'key': 'netIpv4NeighDefaultGcThresh3', 'type': 'int'}, - 'net_netfilter_nf_conntrack_max': {'key': 'netNetfilterNfConntrackMax', 'type': 'int'}, - 'net_netfilter_nf_conntrack_buckets': {'key': 'netNetfilterNfConntrackBuckets', 'type': 'int'}, - 'fs_inotify_max_user_watches': {'key': 'fsInotifyMaxUserWatches', 'type': 'int'}, - 'fs_file_max': {'key': 'fsFileMax', 'type': 'int'}, - 'fs_aio_max_nr': {'key': 'fsAioMaxNr', 'type': 'int'}, - 'fs_nr_open': {'key': 'fsNrOpen', 'type': 'int'}, - 'kernel_threads_max': {'key': 'kernelThreadsMax', 'type': 'int'}, - 'vm_max_map_count': {'key': 'vmMaxMapCount', 'type': 'int'}, - 'vm_swappiness': {'key': 'vmSwappiness', 'type': 'int'}, - 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SysctlConfig, self).__init__(**kwargs) - self.net_core_somaxconn = kwargs.get('net_core_somaxconn', None) - self.net_core_netdev_max_backlog = kwargs.get('net_core_netdev_max_backlog', None) - self.net_core_rmem_default = kwargs.get('net_core_rmem_default', None) - self.net_core_rmem_max = kwargs.get('net_core_rmem_max', None) - self.net_core_wmem_default = kwargs.get('net_core_wmem_default', None) - self.net_core_wmem_max = kwargs.get('net_core_wmem_max', None) - self.net_core_optmem_max = kwargs.get('net_core_optmem_max', None) - self.net_ipv4_tcp_max_syn_backlog = kwargs.get('net_ipv4_tcp_max_syn_backlog', None) - self.net_ipv4_tcp_max_tw_buckets = kwargs.get('net_ipv4_tcp_max_tw_buckets', None) - self.net_ipv4_tcp_fin_timeout = kwargs.get('net_ipv4_tcp_fin_timeout', None) - self.net_ipv4_tcp_keepalive_time = kwargs.get('net_ipv4_tcp_keepalive_time', None) - self.net_ipv4_tcp_keepalive_probes = kwargs.get('net_ipv4_tcp_keepalive_probes', None) - self.net_ipv4_tcpkeepalive_intvl = kwargs.get('net_ipv4_tcpkeepalive_intvl', None) - self.net_ipv4_tcp_tw_reuse = kwargs.get('net_ipv4_tcp_tw_reuse', None) - self.net_ipv4_ip_local_port_range = kwargs.get('net_ipv4_ip_local_port_range', None) - self.net_ipv4_neigh_default_gc_thresh1 = kwargs.get('net_ipv4_neigh_default_gc_thresh1', None) - self.net_ipv4_neigh_default_gc_thresh2 = kwargs.get('net_ipv4_neigh_default_gc_thresh2', None) - self.net_ipv4_neigh_default_gc_thresh3 = kwargs.get('net_ipv4_neigh_default_gc_thresh3', None) - self.net_netfilter_nf_conntrack_max = kwargs.get('net_netfilter_nf_conntrack_max', None) - self.net_netfilter_nf_conntrack_buckets = kwargs.get('net_netfilter_nf_conntrack_buckets', None) - self.fs_inotify_max_user_watches = kwargs.get('fs_inotify_max_user_watches', None) - self.fs_file_max = kwargs.get('fs_file_max', None) - self.fs_aio_max_nr = kwargs.get('fs_aio_max_nr', None) - self.fs_nr_open = kwargs.get('fs_nr_open', None) - self.kernel_threads_max = kwargs.get('kernel_threads_max', None) - self.vm_max_map_count = kwargs.get('vm_max_map_count', None) - self.vm_swappiness = kwargs.get('vm_swappiness', None) - self.vm_vfs_cache_pressure = kwargs.get('vm_vfs_cache_pressure', None) - - -class SystemData(Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' - :type last_modified_by_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. - :type last_modified_at: datetime - """ - - _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(SystemData, self).__init__(**kwargs) - self.created_by = kwargs.get('created_by', None) - self.created_by_type = kwargs.get('created_by_type', None) - self.created_at = kwargs.get('created_at', None) - self.last_modified_by = kwargs.get('last_modified_by', None) - self.last_modified_by_type = kwargs.get('last_modified_by_type', None) - self.last_modified_at = kwargs.get('last_modified_at', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - - -class TimeInWeek(Model): - """Time in a week. - - :param day: A day in a week. Possible values include: 'Sunday', 'Monday', - 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' - :type day: str or ~azure.mgmt.containerservice.v2021_02_01.models.WeekDay - :param hour_slots: hour slots in a day. - :type hour_slots: list[int] - """ - - _attribute_map = { - 'day': {'key': 'day', 'type': 'str'}, - 'hour_slots': {'key': 'hourSlots', 'type': '[int]'}, - } - - def __init__(self, **kwargs): - super(TimeInWeek, self).__init__(**kwargs) - self.day = kwargs.get('day', None) - self.hour_slots = kwargs.get('hour_slots', None) - - -class TimeSpan(Model): - """The time span with start and end properties. - - :param start: The start of a time span - :type start: datetime - :param end: The end of a time span - :type end: datetime - """ - - _attribute_map = { - 'start': {'key': 'start', 'type': 'iso-8601'}, - 'end': {'key': 'end', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(TimeSpan, self).__init__(**kwargs) - self.start = kwargs.get('start', None) - self.end = kwargs.get('end', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_models_py3.py deleted file mode 100644 index 6984a0a5a66..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_models_py3.py +++ /dev/null @@ -1,3137 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_02_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'properties.kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'properties.podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'properties.nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'properties.kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'properties.linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'properties.enableEncryptionAtHost', 'type': 'bool'}, - } - - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, node_public_ip_prefix_id: str=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type - self.kubelet_disk_type = kubelet_disk_type - self.vnet_subnet_id = vnet_subnet_id - self.pod_subnet_id = pod_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = None - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.power_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.node_public_ip_prefix_id = node_public_ip_prefix_id - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - self.kubelet_config = kubelet_config - self.linux_os_config = linux_os_config - self.enable_encryption_at_host = enable_encryption_at_host - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, latest_node_image_version: str=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - self.latest_node_image_version = latest_node_image_version - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, *, max_surge: str=None, **kwargs) -> None: - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = max_surge - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2021_02_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2021_02_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2021_02_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2021_02_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2021_02_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2021_02_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.network_mode = network_mode - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.outbound_type = outbound_type - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2021_02_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class KubeletConfig(Model): - """Kubelet configurations of agent nodes. - - :param cpu_manager_policy: CPU Manager policy to use. - :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. - :type cpu_cfs_quota: bool - :param cpu_cfs_quota_period: Sets CPU CFS quota period value. - :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. - :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. - :type image_gc_low_threshold: int - :param topology_manager_policy: Topology Manager policy to use. - :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). - :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. - :type fail_swap_on: bool - :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of - container log file before it is rotated. - :type container_log_max_size_mb: int - :param container_log_max_files: The maximum number of container log files - that can be present for a container. The number must be ≥ 2. - :type container_log_max_files: int - :param pod_max_pids: The maximum number of processes per pod. - :type pod_max_pids: int - """ - - _validation = { - 'container_log_max_files': {'minimum': 2}, - } - - _attribute_map = { - 'cpu_manager_policy': {'key': 'cpuManagerPolicy', 'type': 'str'}, - 'cpu_cfs_quota': {'key': 'cpuCfsQuota', 'type': 'bool'}, - 'cpu_cfs_quota_period': {'key': 'cpuCfsQuotaPeriod', 'type': 'str'}, - 'image_gc_high_threshold': {'key': 'imageGcHighThreshold', 'type': 'int'}, - 'image_gc_low_threshold': {'key': 'imageGcLowThreshold', 'type': 'int'}, - 'topology_manager_policy': {'key': 'topologyManagerPolicy', 'type': 'str'}, - 'allowed_unsafe_sysctls': {'key': 'allowedUnsafeSysctls', 'type': '[str]'}, - 'fail_swap_on': {'key': 'failSwapOn', 'type': 'bool'}, - 'container_log_max_size_mb': {'key': 'containerLogMaxSizeMB', 'type': 'int'}, - 'container_log_max_files': {'key': 'containerLogMaxFiles', 'type': 'int'}, - 'pod_max_pids': {'key': 'podMaxPids', 'type': 'int'}, - } - - def __init__(self, *, cpu_manager_policy: str=None, cpu_cfs_quota: bool=None, cpu_cfs_quota_period: str=None, image_gc_high_threshold: int=None, image_gc_low_threshold: int=None, topology_manager_policy: str=None, allowed_unsafe_sysctls=None, fail_swap_on: bool=None, container_log_max_size_mb: int=None, container_log_max_files: int=None, pod_max_pids: int=None, **kwargs) -> None: - super(KubeletConfig, self).__init__(**kwargs) - self.cpu_manager_policy = cpu_manager_policy - self.cpu_cfs_quota = cpu_cfs_quota - self.cpu_cfs_quota_period = cpu_cfs_quota_period - self.image_gc_high_threshold = image_gc_high_threshold - self.image_gc_low_threshold = image_gc_low_threshold - self.topology_manager_policy = topology_manager_policy - self.allowed_unsafe_sysctls = allowed_unsafe_sysctls - self.fail_swap_on = fail_swap_on - self.container_log_max_size_mb = container_log_max_size_mb - self.container_log_max_files = container_log_max_files - self.pod_max_pids = pod_max_pids - - -class LinuxOSConfig(Model): - """OS configurations of Linux agent nodes. - - :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2021_02_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. - :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. - :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. - :type swap_file_size_mb: int - """ - - _attribute_map = { - 'sysctls': {'key': 'sysctls', 'type': 'SysctlConfig'}, - 'transparent_huge_page_enabled': {'key': 'transparentHugePageEnabled', 'type': 'str'}, - 'transparent_huge_page_defrag': {'key': 'transparentHugePageDefrag', 'type': 'str'}, - 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, - } - - def __init__(self, *, sysctls=None, transparent_huge_page_enabled: str=None, transparent_huge_page_defrag: str=None, swap_file_size_mb: int=None, **kwargs) -> None: - super(LinuxOSConfig, self).__init__(**kwargs) - self.sysctls = sysctls - self.transparent_huge_page_enabled = transparent_huge_page_enabled - self.transparent_huge_page_defrag = transparent_huge_page_defrag - self.swap_file_size_mb = swap_file_size_mb - - -class MaintenanceConfiguration(SubResource): - """maintenance configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar system_data: The system meta data relating to this resource. - :vartype system_data: - ~azure.mgmt.containerservice.v2021_02_01.models.SystemData - :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2021_02_01.models.TimeInWeek] - :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2021_02_01.models.TimeSpan] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'time_in_week': {'key': 'properties.timeInWeek', 'type': '[TimeInWeek]'}, - 'not_allowed_time': {'key': 'properties.notAllowedTime', 'type': '[TimeSpan]'}, - } - - def __init__(self, *, time_in_week=None, not_allowed_time=None, **kwargs) -> None: - super(MaintenanceConfiguration, self).__init__(**kwargs) - self.system_data = None - self.time_in_week = time_in_week - self.not_allowed_time = not_allowed_time - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :param fqdn_subdomain: FQDN subdomain specified when creating private - cluster with custom private dns zone. - :type fqdn_subdomain: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy - config. - :vartype azure_portal_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAddonProfile] - :param pod_identity_profile: Profile of managed cluster pod identity. - :type pod_identity_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAADProfile - :param auto_upgrade_profile: Profile of auto upgrade configuration. - :type auto_upgrade_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterSKU - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - 'azure_portal_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn_subdomain': {'key': 'properties.fqdnSubdomain', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'azure_portal_fqdn': {'key': 'properties.azurePortalFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, fqdn_subdomain: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, pod_identity_profile=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_upgrade_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, identity=None, sku=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn_subdomain = fqdn_subdomain - self.fqdn = None - self.private_fqdn = None - self.azure_portal_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.pod_identity_profile = pod_identity_profile - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.auto_upgrade_profile = auto_upgrade_profile - self.auto_scaler_profile = auto_scaler_profile - self.api_server_access_profile = api_server_access_profile - self.disk_encryption_set_id = disk_encryption_set_id - self.identity_profile = identity_profile - self.identity = identity - self.sku = sku - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, managed: bool=None, enable_azure_rbac: bool=None, admin_group_object_ids=None, client_app_id: str=None, server_app_id: str=None, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = managed - self.enable_azure_rbac = enable_azure_rbac - self.admin_group_object_ids = admin_group_object_ids - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_02_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, - } - - def __init__(self, *, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, node_public_ip_prefix_id: str=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type - self.kubelet_disk_type = kubelet_disk_type - self.vnet_subnet_id = vnet_subnet_id - self.pod_subnet_id = pod_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = None - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.power_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.node_public_ip_prefix_id = node_public_ip_prefix_id - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - self.kubelet_config = kubelet_config - self.linux_os_config = linux_os_config - self.enable_encryption_at_host = enable_encryption_at_host - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. Possible values include: 'Standard_A1', - 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2', - 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', 'Standard_A4', - 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', 'Standard_A6', - 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', 'Standard_A8m_v2', - 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', 'Standard_B4ms', - 'Standard_B8ms', 'Standard_D1', 'Standard_D11', 'Standard_D11_v2', - 'Standard_D11_v2_Promo', 'Standard_D12', 'Standard_D12_v2', - 'Standard_D12_v2_Promo', 'Standard_D13', 'Standard_D13_v2', - 'Standard_D13_v2_Promo', 'Standard_D14', 'Standard_D14_v2', - 'Standard_D14_v2_Promo', 'Standard_D15_v2', 'Standard_D16_v3', - 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', - 'Standard_D2_v2_Promo', 'Standard_D2_v3', 'Standard_D2s_v3', - 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', 'Standard_D3_v2', - 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. - May not be changed after creation. Possible values include: 'Managed', - 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_02_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_02_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str, count: int=None, vm_size=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, node_public_ip_prefix_id: str=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, os_disk_type=os_disk_type, kubelet_disk_type=kubelet_disk_type, vnet_subnet_id=vnet_subnet_id, pod_subnet_id=pod_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, upgrade_settings=upgrade_settings, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, node_public_ip_prefix_id=node_public_ip_prefix_id, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, proximity_placement_group_id=proximity_placement_group_id, kubelet_config=kubelet_config, linux_os_config=linux_os_config, enable_encryption_at_host=enable_encryption_at_host, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - :param private_dns_zone: Private dns zone mode for private cluster. - :type private_dns_zone: str - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, private_dns_zone: str=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - self.private_dns_zone = private_dns_zone - - -class ManagedClusterAutoUpgradeProfile(Model): - """Auto upgrade profile for a managed cluster. - - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2021_02_01.models.UpgradeChannel - """ - - _attribute_map = { - 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, - } - - def __init__(self, *, upgrade_channel=None, **kwargs) -> None: - super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) - self.upgrade_channel = upgrade_channel - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.user_assigned_identities = user_assigned_identities - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2021_02_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - self.allocated_outbound_ports = allocated_outbound_ports - self.idle_timeout_in_minutes = idle_timeout_in_minutes - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2021_02_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2021_02_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPodIdentity(Model): - """ManagedClusterPodIdentity. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity. - :type name: str - :param namespace: Required. Namespace of the pod identity. - :type namespace: str - :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2021_02_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentityProvisioningState - :ivar provisioning_info: - :vartype provisioning_info: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentityProvisioningInfo - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'identity': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_info': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'UserAssignedIdentity'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, - } - - def __init__(self, *, name: str, namespace: str, identity, **kwargs) -> None: - super(ManagedClusterPodIdentity, self).__init__(**kwargs) - self.name = name - self.namespace = namespace - self.identity = identity - self.provisioning_state = None - self.provisioning_info = None - - -class ManagedClusterPodIdentityException(Model): - """ManagedClusterPodIdentityException. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity exception. - :type name: str - :param namespace: Required. Namespace of the pod identity exception. - :type namespace: str - :param pod_labels: Required. Pod labels to match. - :type pod_labels: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'pod_labels': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, - } - - def __init__(self, *, name: str, namespace: str, pod_labels, **kwargs) -> None: - super(ManagedClusterPodIdentityException, self).__init__(**kwargs) - self.name = name - self.namespace = namespace - self.pod_labels = pod_labels - - -class ManagedClusterPodIdentityProfile(Model): - """ManagedClusterPodIdentityProfile. - - :param enabled: Whether the pod identity addon is enabled. - :type enabled: bool - :param allow_network_plugin_kubenet: Customer consent for enabling AAD pod - identity addon in cluster using Kubenet network plugin. - :type allow_network_plugin_kubenet: bool - :param user_assigned_identities: User assigned pod identity settings. - :type user_assigned_identities: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. - :type user_assigned_identity_exceptions: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPodIdentityException] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'allow_network_plugin_kubenet': {'key': 'allowNetworkPluginKubenet', 'type': 'bool'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '[ManagedClusterPodIdentity]'}, - 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, - } - - def __init__(self, *, enabled: bool=None, allow_network_plugin_kubenet: bool=None, user_assigned_identities=None, user_assigned_identity_exceptions=None, **kwargs) -> None: - super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) - self.enabled = enabled - self.allow_network_plugin_kubenet = allow_network_plugin_kubenet - self.user_assigned_identities = user_assigned_identities - self.user_assigned_identity_exceptions = user_assigned_identity_exceptions - - -class ManagedClusterPodIdentityProvisioningInfo(Model): - """ManagedClusterPodIdentityProvisioningInfo. - - :param error: Pod identity assignment error (if any). - :type error: ~azure.mgmt.containerservice.v2021_02_01.models.CloudError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudError'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) - self.error = error - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'priority', 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2021_02_01.models.Expander - :param max_empty_bulk_delete: - :type max_empty_bulk_delete: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - :param max_node_provision_time: - :type max_node_provision_time: str - :param max_total_unready_percentage: - :type max_total_unready_percentage: str - :param new_pod_scale_up_delay: - :type new_pod_scale_up_delay: str - :param ok_total_unready_count: - :type ok_total_unready_count: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param skip_nodes_with_local_storage: - :type skip_nodes_with_local_storage: str - :param skip_nodes_with_system_pods: - :type skip_nodes_with_system_pods: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'expander': {'key': 'expander', 'type': 'str'}, - 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - 'max_node_provision_time': {'key': 'max-node-provision-time', 'type': 'str'}, - 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, - 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, - 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, - 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, - } - - def __init__(self, *, balance_similar_node_groups: str=None, expander=None, max_empty_bulk_delete: str=None, max_graceful_termination_sec: str=None, max_node_provision_time: str=None, max_total_unready_percentage: str=None, new_pod_scale_up_delay: str=None, ok_total_unready_count: str=None, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, skip_nodes_with_local_storage: str=None, skip_nodes_with_system_pods: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = balance_similar_node_groups - self.expander = expander - self.max_empty_bulk_delete = max_empty_bulk_delete - self.max_graceful_termination_sec = max_graceful_termination_sec - self.max_node_provision_time = max_node_provision_time - self.max_total_unready_percentage = max_total_unready_percentage - self.new_pod_scale_up_delay = new_pod_scale_up_delay - self.ok_total_unready_count = ok_total_unready_count - self.scan_interval = scan_interval - self.scale_down_delay_after_add = scale_down_delay_after_add - self.scale_down_delay_after_delete = scale_down_delay_after_delete - self.scale_down_delay_after_failure = scale_down_delay_after_failure - self.scale_down_unneeded_time = scale_down_unneeded_time - self.scale_down_unready_time = scale_down_unready_time - self.scale_down_utilization_threshold = scale_down_utilization_threshold - self.skip_nodes_with_local_storage = skip_nodes_with_local_storage - self.skip_nodes_with_system_pods = skip_nodes_with_system_pods - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, tier=None, **kwargs) -> None: - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = name - self.tier = tier - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" - :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.LicenseType - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, license_type=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - self.license_type = license_type - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class PowerState(Model): - """Describes the Power State of the cluster. - - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' - :type code: str or ~azure.mgmt.containerservice.v2021_02_01.models.Code - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, *, code=None, **kwargs) -> None: - super(PowerState, self).__init__(**kwargs) - self.code = code - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = id - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, *, private_link_service_connection_state, private_endpoint=None, **kwargs) -> None: - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = value - - -class PrivateLinkResource(Model): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The ID of the private link resource. - :type id: str - :param name: The name of the private link resource. - :type name: str - :param type: The resource type. - :type type: str - :param group_id: The group ID of the resource. - :type group_id: str - :param required_members: RequiredMembers of the resource - :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. - :vartype private_link_service_id: str - """ - - _validation = { - 'private_link_service_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, type: str=None, group_id: str=None, required_members=None, **kwargs) -> None: - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = id - self.name = name - self.type = type - self.group_id = group_id - self.required_members = required_members - self.private_link_service_id = None - - -class PrivateLinkResourcesListResult(Model): - """A list of private link resources. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PrivateLinkResourcesListResult, self).__init__(**kwargs) - self.value = value - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2021_02_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, status=None, description: str=None, **kwargs) -> None: - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = status - self.description = description - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class RunCommandRequest(Model): - """run command request. - - :param command: command to run. - :type command: str - :param context: base64 encoded zip file, contains files required by the - command - :type context: str - :param cluster_token: AuthToken issued for AKS AAD Server App. - :type cluster_token: str - """ - - _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'cluster_token': {'key': 'clusterToken', 'type': 'str'}, - } - - def __init__(self, *, command: str=None, context: str=None, cluster_token: str=None, **kwargs) -> None: - super(RunCommandRequest, self).__init__(**kwargs) - self.command = command - self.context = context - self.cluster_token = cluster_token - - -class RunCommandResult(Model): - """run command result. - - :param id: command id. - :type id: str - :param provisioning_state: provisioning State - :type provisioning_state: str - :param exit_code: exit code of the command - :type exit_code: int - :param started_at: time when the command started. - :type started_at: datetime - :param finished_at: time when the command finished. - :type finished_at: datetime - :param logs: command output. - :type logs: str - :param reason: explain why provisioningState is set to failed (if so). - :type reason: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'exit_code': {'key': 'properties.exitCode', 'type': 'int'}, - 'started_at': {'key': 'properties.startedAt', 'type': 'iso-8601'}, - 'finished_at': {'key': 'properties.finishedAt', 'type': 'iso-8601'}, - 'logs': {'key': 'properties.logs', 'type': 'str'}, - 'reason': {'key': 'properties.reason', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, provisioning_state: str=None, exit_code: int=None, started_at=None, finished_at=None, logs: str=None, reason: str=None, **kwargs) -> None: - super(RunCommandResult, self).__init__(**kwargs) - self.id = id - self.provisioning_state = provisioning_state - self.exit_code = exit_code - self.started_at = started_at - self.finished_at = finished_at - self.logs = logs - self.reason = reason - - -class SysctlConfig(Model): - """Sysctl settings for Linux agent nodes. - - :param net_core_somaxconn: Sysctl setting net.core.somaxconn. - :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. - :type net_core_netdev_max_backlog: int - :param net_core_rmem_default: Sysctl setting net.core.rmem_default. - :type net_core_rmem_default: int - :param net_core_rmem_max: Sysctl setting net.core.rmem_max. - :type net_core_rmem_max: int - :param net_core_wmem_default: Sysctl setting net.core.wmem_default. - :type net_core_wmem_default: int - :param net_core_wmem_max: Sysctl setting net.core.wmem_max. - :type net_core_wmem_max: int - :param net_core_optmem_max: Sysctl setting net.core.optmem_max. - :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. - :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. - :type net_ipv4_tcp_max_tw_buckets: int - :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. - :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. - :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. - :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. - :type net_ipv4_tcpkeepalive_intvl: int - :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. - :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. - :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. - :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. - :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. - :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. - :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. - :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. - :type fs_inotify_max_user_watches: int - :param fs_file_max: Sysctl setting fs.file-max. - :type fs_file_max: int - :param fs_aio_max_nr: Sysctl setting fs.aio-max-nr. - :type fs_aio_max_nr: int - :param fs_nr_open: Sysctl setting fs.nr_open. - :type fs_nr_open: int - :param kernel_threads_max: Sysctl setting kernel.threads-max. - :type kernel_threads_max: int - :param vm_max_map_count: Sysctl setting vm.max_map_count. - :type vm_max_map_count: int - :param vm_swappiness: Sysctl setting vm.swappiness. - :type vm_swappiness: int - :param vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. - :type vm_vfs_cache_pressure: int - """ - - _attribute_map = { - 'net_core_somaxconn': {'key': 'netCoreSomaxconn', 'type': 'int'}, - 'net_core_netdev_max_backlog': {'key': 'netCoreNetdevMaxBacklog', 'type': 'int'}, - 'net_core_rmem_default': {'key': 'netCoreRmemDefault', 'type': 'int'}, - 'net_core_rmem_max': {'key': 'netCoreRmemMax', 'type': 'int'}, - 'net_core_wmem_default': {'key': 'netCoreWmemDefault', 'type': 'int'}, - 'net_core_wmem_max': {'key': 'netCoreWmemMax', 'type': 'int'}, - 'net_core_optmem_max': {'key': 'netCoreOptmemMax', 'type': 'int'}, - 'net_ipv4_tcp_max_syn_backlog': {'key': 'netIpv4TcpMaxSynBacklog', 'type': 'int'}, - 'net_ipv4_tcp_max_tw_buckets': {'key': 'netIpv4TcpMaxTwBuckets', 'type': 'int'}, - 'net_ipv4_tcp_fin_timeout': {'key': 'netIpv4TcpFinTimeout', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_time': {'key': 'netIpv4TcpKeepaliveTime', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_probes': {'key': 'netIpv4TcpKeepaliveProbes', 'type': 'int'}, - 'net_ipv4_tcpkeepalive_intvl': {'key': 'netIpv4TcpkeepaliveIntvl', 'type': 'int'}, - 'net_ipv4_tcp_tw_reuse': {'key': 'netIpv4TcpTwReuse', 'type': 'bool'}, - 'net_ipv4_ip_local_port_range': {'key': 'netIpv4IpLocalPortRange', 'type': 'str'}, - 'net_ipv4_neigh_default_gc_thresh1': {'key': 'netIpv4NeighDefaultGcThresh1', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh2': {'key': 'netIpv4NeighDefaultGcThresh2', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh3': {'key': 'netIpv4NeighDefaultGcThresh3', 'type': 'int'}, - 'net_netfilter_nf_conntrack_max': {'key': 'netNetfilterNfConntrackMax', 'type': 'int'}, - 'net_netfilter_nf_conntrack_buckets': {'key': 'netNetfilterNfConntrackBuckets', 'type': 'int'}, - 'fs_inotify_max_user_watches': {'key': 'fsInotifyMaxUserWatches', 'type': 'int'}, - 'fs_file_max': {'key': 'fsFileMax', 'type': 'int'}, - 'fs_aio_max_nr': {'key': 'fsAioMaxNr', 'type': 'int'}, - 'fs_nr_open': {'key': 'fsNrOpen', 'type': 'int'}, - 'kernel_threads_max': {'key': 'kernelThreadsMax', 'type': 'int'}, - 'vm_max_map_count': {'key': 'vmMaxMapCount', 'type': 'int'}, - 'vm_swappiness': {'key': 'vmSwappiness', 'type': 'int'}, - 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, - } - - def __init__(self, *, net_core_somaxconn: int=None, net_core_netdev_max_backlog: int=None, net_core_rmem_default: int=None, net_core_rmem_max: int=None, net_core_wmem_default: int=None, net_core_wmem_max: int=None, net_core_optmem_max: int=None, net_ipv4_tcp_max_syn_backlog: int=None, net_ipv4_tcp_max_tw_buckets: int=None, net_ipv4_tcp_fin_timeout: int=None, net_ipv4_tcp_keepalive_time: int=None, net_ipv4_tcp_keepalive_probes: int=None, net_ipv4_tcpkeepalive_intvl: int=None, net_ipv4_tcp_tw_reuse: bool=None, net_ipv4_ip_local_port_range: str=None, net_ipv4_neigh_default_gc_thresh1: int=None, net_ipv4_neigh_default_gc_thresh2: int=None, net_ipv4_neigh_default_gc_thresh3: int=None, net_netfilter_nf_conntrack_max: int=None, net_netfilter_nf_conntrack_buckets: int=None, fs_inotify_max_user_watches: int=None, fs_file_max: int=None, fs_aio_max_nr: int=None, fs_nr_open: int=None, kernel_threads_max: int=None, vm_max_map_count: int=None, vm_swappiness: int=None, vm_vfs_cache_pressure: int=None, **kwargs) -> None: - super(SysctlConfig, self).__init__(**kwargs) - self.net_core_somaxconn = net_core_somaxconn - self.net_core_netdev_max_backlog = net_core_netdev_max_backlog - self.net_core_rmem_default = net_core_rmem_default - self.net_core_rmem_max = net_core_rmem_max - self.net_core_wmem_default = net_core_wmem_default - self.net_core_wmem_max = net_core_wmem_max - self.net_core_optmem_max = net_core_optmem_max - self.net_ipv4_tcp_max_syn_backlog = net_ipv4_tcp_max_syn_backlog - self.net_ipv4_tcp_max_tw_buckets = net_ipv4_tcp_max_tw_buckets - self.net_ipv4_tcp_fin_timeout = net_ipv4_tcp_fin_timeout - self.net_ipv4_tcp_keepalive_time = net_ipv4_tcp_keepalive_time - self.net_ipv4_tcp_keepalive_probes = net_ipv4_tcp_keepalive_probes - self.net_ipv4_tcpkeepalive_intvl = net_ipv4_tcpkeepalive_intvl - self.net_ipv4_tcp_tw_reuse = net_ipv4_tcp_tw_reuse - self.net_ipv4_ip_local_port_range = net_ipv4_ip_local_port_range - self.net_ipv4_neigh_default_gc_thresh1 = net_ipv4_neigh_default_gc_thresh1 - self.net_ipv4_neigh_default_gc_thresh2 = net_ipv4_neigh_default_gc_thresh2 - self.net_ipv4_neigh_default_gc_thresh3 = net_ipv4_neigh_default_gc_thresh3 - self.net_netfilter_nf_conntrack_max = net_netfilter_nf_conntrack_max - self.net_netfilter_nf_conntrack_buckets = net_netfilter_nf_conntrack_buckets - self.fs_inotify_max_user_watches = fs_inotify_max_user_watches - self.fs_file_max = fs_file_max - self.fs_aio_max_nr = fs_aio_max_nr - self.fs_nr_open = fs_nr_open - self.kernel_threads_max = kernel_threads_max - self.vm_max_map_count = vm_max_map_count - self.vm_swappiness = vm_swappiness - self.vm_vfs_cache_pressure = vm_vfs_cache_pressure - - -class SystemData(Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' - :type last_modified_by_type: str or - ~azure.mgmt.containerservice.v2021_02_01.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. - :type last_modified_at: datetime - """ - - _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: - super(SystemData, self).__init__(**kwargs) - self.created_by = created_by - self.created_by_type = created_by_type - self.created_at = created_at - self.last_modified_by = last_modified_by - self.last_modified_by_type = last_modified_by_type - self.last_modified_at = last_modified_at - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags - - -class TimeInWeek(Model): - """Time in a week. - - :param day: A day in a week. Possible values include: 'Sunday', 'Monday', - 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' - :type day: str or ~azure.mgmt.containerservice.v2021_02_01.models.WeekDay - :param hour_slots: hour slots in a day. - :type hour_slots: list[int] - """ - - _attribute_map = { - 'day': {'key': 'day', 'type': 'str'}, - 'hour_slots': {'key': 'hourSlots', 'type': '[int]'}, - } - - def __init__(self, *, day=None, hour_slots=None, **kwargs) -> None: - super(TimeInWeek, self).__init__(**kwargs) - self.day = day - self.hour_slots = hour_slots - - -class TimeSpan(Model): - """The time span with start and end properties. - - :param start: The start of a time span - :type start: datetime - :param end: The end of a time span - :type end: datetime - """ - - _attribute_map = { - 'start': {'key': 'start', 'type': 'iso-8601'}, - 'end': {'key': 'end', 'type': 'iso-8601'}, - } - - def __init__(self, *, start=None, end=None, **kwargs) -> None: - super(TimeSpan, self).__init__(**kwargs) - self.start = start - self.end = end diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_paged_models.py deleted file mode 100644 index 725952adaf8..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/models/_paged_models.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class MaintenanceConfigurationPaged(Paged): - """ - A paging container for iterating over a list of :class:`MaintenanceConfiguration ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MaintenanceConfiguration]'} - } - - def __init__(self, *args, **kwargs): - - super(MaintenanceConfigurationPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_agent_pools_operations.py deleted file mode 100644 index 703435e5b60..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,610 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-02-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2021_02_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2021_02_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_02_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_02_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} - - - def _upgrade_node_image_version_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.upgrade_node_image_version.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 202: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def upgrade_node_image_version( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrade node image version of an agent pool to the latest. - - Upgrade node image version of an agent pool to the latest. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_02_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_02_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._upgrade_node_image_version_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_maintenance_configurations_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_maintenance_configurations_operations.py deleted file mode 100644 index fc4f3c96c7c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_maintenance_configurations_operations.py +++ /dev/null @@ -1,387 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class MaintenanceConfigurationsOperations(object): - """MaintenanceConfigurationsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-02-01" - - self.config = config - - def list_by_managed_cluster( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of maintenance configurations in the specified managed - cluster. - - Gets a list of maintenance configurations in the specified managed - cluster. The operation returns properties of each maintenance - configuration. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of MaintenanceConfiguration - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.MaintenanceConfigurationPaged[~azure.mgmt.containerservice.v2021_02_01.models.MaintenanceConfiguration] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_managed_cluster.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.MaintenanceConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_managed_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'} - - def get( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, **operation_config): - """Gets the maintenance configuration. - - Gets the details of maintenance configurations by managed cluster and - resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param config_name: The name of the maintenance configuration. - :type config_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MaintenanceConfiguration or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.MaintenanceConfiguration - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, config_name, time_in_week=None, not_allowed_time=None, custom_headers=None, raw=False, **operation_config): - parameters = models.MaintenanceConfiguration(time_in_week=time_in_week, not_allowed_time=not_allowed_time) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'MaintenanceConfiguration') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, config_name, time_in_week=None, not_allowed_time=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a maintenance configurations. - - Creates or updates a maintenance configuration in the specified managed - cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param config_name: The name of the maintenance configuration. - :type config_name: str - :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2021_02_01.models.TimeInWeek] - :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2021_02_01.models.TimeSpan] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - MaintenanceConfiguration or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_02_01.models.MaintenanceConfiguration] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_02_01.models.MaintenanceConfiguration]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - time_in_week=time_in_week, - not_allowed_time=not_allowed_time, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a maintenance configuration. - - Deletes the maintenance configuration in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param config_name: The name of the maintenance configuration. - :type config_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_managed_clusters_operations.py deleted file mode 100644 index e9f7f05452f..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1473 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. **WARNING**: This API - will be deprecated. Instead use - [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) - or - [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) - . - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_02_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2021_02_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} - - - def _stop_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def stop( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Stop Managed Cluster. - - Stops a Running Managed Cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} - - - def _start_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Start Managed Cluster. - - Starts a Stopped Managed Cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} - - - def _run_command_initial( - self, resource_group_name, resource_name, request_payload, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.run_command.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request_payload, 'RunCommandRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def run_command( - self, resource_group_name, resource_name, request_payload, custom_headers=None, raw=False, polling=True, **operation_config): - """Run Command against Managed Kubernetes Service. - - Submit a command to run against managed kubernetes service, it will - create a pod to run the command. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param request_payload: Parameters supplied to the RunCommand - operation. - :type request_payload: - ~azure.mgmt.containerservice.v2021_02_01.models.RunCommandRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RunCommandResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_02_01.models.RunCommandResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_02_01.models.RunCommandResult]] - :raises: :class:`CloudError` - """ - raw_result = self._run_command_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - request_payload=request_payload, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'} - - def get_command_result( - self, resource_group_name, resource_name, command_id, custom_headers=None, raw=False, **operation_config): - """Get command result. - - Get command result from previous runCommand invoke. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param command_id: Id of the command request. - :type command_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RunCommandResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.RunCommandResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_command_result.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'commandId': self._serialize.url("command_id", command_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_command_result.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_operations.py deleted file mode 100644 index 81433d715ef..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-02-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2021_02_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_private_endpoint_connections_operations.py deleted file mode 100644 index 7e0068570c4..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_private_endpoint_connections_operations.py +++ /dev/null @@ -1,348 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class PrivateEndpointConnectionsOperations(object): - """PrivateEndpointConnectionsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-02-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private endpoint connections in the specified managed - cluster. - - Gets a list of private endpoint connections in the specified managed - cluster. The operation returns properties of each private endpoint - connection. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnectionListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpointConnectionListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} - - def get( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """Gets the private endpoint connection. - - Gets the details of the private endpoint connection by managed cluster - and resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def update( - self, resource_group_name, resource_name, private_endpoint_connection_name, private_link_service_connection_state, private_endpoint=None, custom_headers=None, raw=False, **operation_config): - """Updates a private endpoint connection. - - Updates a private endpoint connection in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param private_link_service_connection_state: A collection of - information about the state of the connection between service consumer - and provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkServiceConnectionState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpoint - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a private endpoint connection. - - Deletes the private endpoint connection in the specified managed - cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_private_link_resources_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_private_link_resources_operations.py deleted file mode 100644 index 6971ca8fd27..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_private_link_resources_operations.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class PrivateLinkResourcesOperations(object): - """PrivateLinkResourcesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-02-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private link resources in the specified managed cluster. - - Gets a list of private link resources in the specified managed cluster. - The operation returns properties of each private link resource. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResourcesListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkResourcesListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_resolve_private_link_service_id_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_resolve_private_link_service_id_operations.py deleted file mode 100644 index e53b737880f..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_resolve_private_link_service_id_operations.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ResolvePrivateLinkServiceIdOperations(object): - """ResolvePrivateLinkServiceIdOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-02-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-02-01" - - self.config = config - - def post( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - """Gets the private link service ID for the specified managed cluster. - - Gets the private link service ID the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters (name, groupId) supplied in order to - resolve a private link service ID. - :type parameters: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_02_01.models.PrivateLinkResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.post.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateLinkResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/version.py deleted file mode 100644 index 28b76590866..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2021-02-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/__init__.py deleted file mode 100644 index b7cb9d01cb1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import ContainerServiceClientConfiguration -from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/_configuration.py deleted file mode 100644 index e94fbc7005d..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/_container_service_client.py deleted file mode 100644 index 64f594ce8fb..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/_container_service_client.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ContainerServiceClientConfiguration -from .operations import Operations -from .operations import ManagedClustersOperations -from .operations import MaintenanceConfigurationsOperations -from .operations import AgentPoolsOperations -from .operations import PrivateEndpointConnectionsOperations -from .operations import PrivateLinkResourcesOperations -from .operations import ResolvePrivateLinkServiceIdOperations -from . import models - - -class ContainerServiceClient(SDKClient): - """The Container Service Client. - - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2021_03_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.containerservice.v2021_03_01.operations.ManagedClustersOperations - :ivar maintenance_configurations: MaintenanceConfigurations operations - :vartype maintenance_configurations: azure.mgmt.containerservice.v2021_03_01.operations.MaintenanceConfigurationsOperations - :ivar agent_pools: AgentPools operations - :vartype agent_pools: azure.mgmt.containerservice.v2021_03_01.operations.AgentPoolsOperations - :ivar private_endpoint_connections: PrivateEndpointConnections operations - :vartype private_endpoint_connections: azure.mgmt.containerservice.v2021_03_01.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResources operations - :vartype private_link_resources: azure.mgmt.containerservice.v2021_03_01.operations.PrivateLinkResourcesOperations - :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceId operations - :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2021_03_01.operations.ResolvePrivateLinkServiceIdOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2021-03-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.maintenance_configurations = MaintenanceConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/__init__.py deleted file mode 100644 index 3eb3201a59a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/__init__.py +++ /dev/null @@ -1,288 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AgentPool - from ._models_py3 import AgentPoolAvailableVersions - from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models_py3 import AgentPoolUpgradeProfile - from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models_py3 import AgentPoolUpgradeSettings - from ._models_py3 import ContainerServiceDiagnosticsProfile - from ._models_py3 import ContainerServiceLinuxProfile - from ._models_py3 import ContainerServiceMasterProfile - from ._models_py3 import ContainerServiceNetworkProfile - from ._models_py3 import ContainerServiceSshConfiguration - from ._models_py3 import ContainerServiceSshPublicKey - from ._models_py3 import ContainerServiceVMDiagnostics - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ExtendedLocation - from ._models_py3 import KubeletConfig - from ._models_py3 import LinuxOSConfig - from ._models_py3 import MaintenanceConfiguration - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterAADProfile - from ._models_py3 import ManagedClusterAccessProfile - from ._models_py3 import ManagedClusterAddonProfile - from ._models_py3 import ManagedClusterAddonProfileIdentity - from ._models_py3 import ManagedClusterAgentPoolProfile - from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile - from ._models_py3 import ManagedClusterAutoUpgradeProfile - from ._models_py3 import ManagedClusterHTTPProxyConfig - from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models_py3 import ManagedClusterLoadBalancerProfile - from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models_py3 import ManagedClusterPodIdentity - from ._models_py3 import ManagedClusterPodIdentityException - from ._models_py3 import ManagedClusterPodIdentityProfile - from ._models_py3 import ManagedClusterPodIdentityProvisioningInfo - from ._models_py3 import ManagedClusterPoolUpgradeProfile - from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile - from ._models_py3 import ManagedClusterSKU - from ._models_py3 import ManagedClusterUpgradeProfile - from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue - from ._models_py3 import OSOptionProfile - from ._models_py3 import OSOptionProperty - from ._models_py3 import PowerState - from ._models_py3 import PrivateEndpoint - from ._models_py3 import PrivateEndpointConnection - from ._models_py3 import PrivateEndpointConnectionListResult - from ._models_py3 import PrivateLinkResource - from ._models_py3 import PrivateLinkResourcesListResult - from ._models_py3 import PrivateLinkServiceConnectionState - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import RunCommandRequest - from ._models_py3 import RunCommandResult - from ._models_py3 import SubResource - from ._models_py3 import SysctlConfig - from ._models_py3 import SystemData - from ._models_py3 import TagsObject - from ._models_py3 import TimeInWeek - from ._models_py3 import TimeSpan - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import AgentPoolUpgradeSettings - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ExtendedLocation - from ._models import KubeletConfig - from ._models import LinuxOSConfig - from ._models import MaintenanceConfiguration - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterAutoUpgradeProfile - from ._models import ManagedClusterHTTPProxyConfig - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPodIdentity - from ._models import ManagedClusterPodIdentityException - from ._models import ManagedClusterPodIdentityProfile - from ._models import ManagedClusterPodIdentityProvisioningInfo - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterSKU - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import OSOptionProfile - from ._models import OSOptionProperty - from ._models import PowerState - from ._models import PrivateEndpoint - from ._models import PrivateEndpointConnection - from ._models import PrivateEndpointConnectionListResult - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourcesListResult - from ._models import PrivateLinkServiceConnectionState - from ._models import Resource - from ._models import ResourceReference - from ._models import RunCommandRequest - from ._models import RunCommandResult - from ._models import SubResource - from ._models import SysctlConfig - from ._models import SystemData - from ._models import TagsObject - from ._models import TimeInWeek - from ._models import TimeSpan - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import MaintenanceConfigurationPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSDiskType, - KubeletDiskType, - OSType, - OSSKU, - AgentPoolType, - AgentPoolMode, - Code, - ScaleSetPriority, - ScaleSetEvictionPolicy, - GPUInstanceProfile, - LicenseType, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, - LoadBalancerSku, - CreatedByType, - WeekDay, - ManagedClusterPodIdentityProvisioningState, - UpgradeChannel, - Expander, - ResourceIdentityType, - ManagedClusterSKUName, - ManagedClusterSKUTier, - ExtendedLocationTypes, - PrivateEndpointConnectionProvisioningState, - ConnectionStatus, -) - -__all__ = [ - 'AgentPool', - 'AgentPoolAvailableVersions', - 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', - 'AgentPoolUpgradeProfile', - 'AgentPoolUpgradeProfilePropertiesUpgradesItem', - 'AgentPoolUpgradeSettings', - 'ContainerServiceDiagnosticsProfile', - 'ContainerServiceLinuxProfile', - 'ContainerServiceMasterProfile', - 'ContainerServiceNetworkProfile', - 'ContainerServiceSshConfiguration', - 'ContainerServiceSshPublicKey', - 'ContainerServiceVMDiagnostics', - 'CredentialResult', - 'CredentialResults', - 'ExtendedLocation', - 'KubeletConfig', - 'LinuxOSConfig', - 'MaintenanceConfiguration', - 'ManagedCluster', - 'ManagedClusterAADProfile', - 'ManagedClusterAccessProfile', - 'ManagedClusterAddonProfile', - 'ManagedClusterAddonProfileIdentity', - 'ManagedClusterAgentPoolProfile', - 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', - 'ManagedClusterAutoUpgradeProfile', - 'ManagedClusterHTTPProxyConfig', - 'ManagedClusterIdentity', - 'ManagedClusterIdentityUserAssignedIdentitiesValue', - 'ManagedClusterLoadBalancerProfile', - 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', - 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', - 'ManagedClusterLoadBalancerProfileOutboundIPs', - 'ManagedClusterPodIdentity', - 'ManagedClusterPodIdentityException', - 'ManagedClusterPodIdentityProfile', - 'ManagedClusterPodIdentityProvisioningInfo', - 'ManagedClusterPoolUpgradeProfile', - 'ManagedClusterPoolUpgradeProfileUpgradesItem', - 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', - 'ManagedClusterSKU', - 'ManagedClusterUpgradeProfile', - 'ManagedClusterWindowsProfile', - 'OperationValue', - 'OSOptionProfile', - 'OSOptionProperty', - 'PowerState', - 'PrivateEndpoint', - 'PrivateEndpointConnection', - 'PrivateEndpointConnectionListResult', - 'PrivateLinkResource', - 'PrivateLinkResourcesListResult', - 'PrivateLinkServiceConnectionState', - 'Resource', - 'ResourceReference', - 'RunCommandRequest', - 'RunCommandResult', - 'SubResource', - 'SysctlConfig', - 'SystemData', - 'TagsObject', - 'TimeInWeek', - 'TimeSpan', - 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'MaintenanceConfigurationPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSDiskType', - 'KubeletDiskType', - 'OSType', - 'OSSKU', - 'AgentPoolType', - 'AgentPoolMode', - 'Code', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', - 'GPUInstanceProfile', - 'LicenseType', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', - 'LoadBalancerSku', - 'CreatedByType', - 'WeekDay', - 'ManagedClusterPodIdentityProvisioningState', - 'UpgradeChannel', - 'Expander', - 'ResourceIdentityType', - 'ManagedClusterSKUName', - 'ManagedClusterSKUTier', - 'ExtendedLocationTypes', - 'PrivateEndpointConnectionProvisioningState', - 'ConnectionStatus', -] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_container_service_client_enums.py deleted file mode 100644 index 07d226f1f08..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_container_service_client_enums.py +++ /dev/null @@ -1,378 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" - - -class OSDiskType(str, Enum): - - managed = "Managed" - ephemeral = "Ephemeral" - - -class KubeletDiskType(str, Enum): - - os = "OS" - temporary = "Temporary" - - -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - -class OSSKU(str, Enum): - - ubuntu = "Ubuntu" - cbl_mariner = "CBLMariner" - - -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - -class AgentPoolMode(str, Enum): - - system = "System" - user = "User" - - -class Code(str, Enum): - - running = "Running" - stopped = "Stopped" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class GPUInstanceProfile(str, Enum): - - mig1g = "MIG1g" - mig2g = "MIG2g" - mig3g = "MIG3g" - mig4g = "MIG4g" - mig7g = "MIG7g" - - -class LicenseType(str, Enum): - - none = "None" - windows_server = "Windows_Server" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class CreatedByType(str, Enum): - - user = "User" - application = "Application" - managed_identity = "ManagedIdentity" - key = "Key" - - -class WeekDay(str, Enum): - - sunday = "Sunday" - monday = "Monday" - tuesday = "Tuesday" - wednesday = "Wednesday" - thursday = "Thursday" - friday = "Friday" - saturday = "Saturday" - - -class ManagedClusterPodIdentityProvisioningState(str, Enum): - - assigned = "Assigned" - updating = "Updating" - deleting = "Deleting" - failed = "Failed" - - -class UpgradeChannel(str, Enum): - - rapid = "rapid" - stable = "stable" - patch = "patch" - node_image = "node-image" - none = "none" - - -class Expander(str, Enum): - - least_waste = "least-waste" - most_pods = "most-pods" - priority = "priority" - random = "random" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - none = "None" - - -class ManagedClusterSKUName(str, Enum): - - basic = "Basic" - - -class ManagedClusterSKUTier(str, Enum): - - paid = "Paid" - free = "Free" - - -class ExtendedLocationTypes(str, Enum): - - edge_zone = "EdgeZone" - - -class PrivateEndpointConnectionProvisioningState(str, Enum): - - succeeded = "Succeeded" - creating = "Creating" - deleting = "Deleting" - failed = "Failed" - - -class ConnectionStatus(str, Enum): - - pending = "Pending" - approved = "Approved" - rejected = "Rejected" - disconnected = "Disconnected" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_models.py deleted file mode 100644 index 44761131706..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_models.py +++ /dev/null @@ -1,3212 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. - :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' - :type os_sku: str or ~azure.mgmt.containerservice.v2021_03_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_03_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - :param enable_fips: Whether to use FIPS enabled OS - :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' - :type gpu_instance_profile: str or - ~azure.mgmt.containerservice.v2021_03_01.models.GPUInstanceProfile - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'properties.kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'properties.podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'os_sku': {'key': 'properties.osSKU', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'properties.nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'properties.kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'properties.linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'properties.enableEncryptionAtHost', 'type': 'bool'}, - 'enable_fips': {'key': 'properties.enableFIPS', 'type': 'bool'}, - 'gpu_instance_profile': {'key': 'properties.gpuInstanceProfile', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPool, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.os_disk_type = kwargs.get('os_disk_type', None) - self.kubelet_disk_type = kwargs.get('kubelet_disk_type', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.pod_subnet_id = kwargs.get('pod_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.os_sku = kwargs.get('os_sku', None) - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = None - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.power_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.node_public_ip_prefix_id = kwargs.get('node_public_ip_prefix_id', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - self.kubelet_config = kwargs.get('kubelet_config', None) - self.linux_os_config = kwargs.get('linux_os_config', None) - self.enable_encryption_at_host = kwargs.get('enable_encryption_at_host', None) - self.enable_fips = kwargs.get('enable_fips', None) - self.gpu_instance_profile = kwargs.get('gpu_instance_profile', None) - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = kwargs.get('agent_pool_versions', None) - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = kwargs.get('default', None) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - self.latest_node_image_version = kwargs.get('latest_node_image_version', None) - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = kwargs.get('max_surge', None) - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2021_03_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2021_03_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, **kwargs): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") - self.storage_profile = kwargs.get('storage_profile', None) - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2021_03_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2021_03_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2021_03_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2021_03_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = kwargs.get('network_plugin', "kubenet") - self.network_policy = kwargs.get('network_policy', None) - self.network_mode = kwargs.get('network_mode', None) - self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") - self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") - self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") - self.outbound_type = kwargs.get('outbound_type', "loadBalancer") - self.load_balancer_sku = kwargs.get('load_balancer_sku', None) - self.load_balancer_profile = kwargs.get('load_balancer_profile', None) - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2021_03_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class ExtendedLocation(Model): - """The complex type of the extended location. - - :param name: The name of the extended location. - :type name: str - :param type: The type of the extended location. Possible values include: - 'EdgeZone' - :type type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ExtendedLocationTypes - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExtendedLocation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - - -class KubeletConfig(Model): - """Kubelet configurations of agent nodes. - - :param cpu_manager_policy: CPU Manager policy to use. - :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. - :type cpu_cfs_quota: bool - :param cpu_cfs_quota_period: Sets CPU CFS quota period value. - :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. - :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. - :type image_gc_low_threshold: int - :param topology_manager_policy: Topology Manager policy to use. - :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). - :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. - :type fail_swap_on: bool - :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of - container log file before it is rotated. - :type container_log_max_size_mb: int - :param container_log_max_files: The maximum number of container log files - that can be present for a container. The number must be ≥ 2. - :type container_log_max_files: int - :param pod_max_pids: The maximum number of processes per pod. - :type pod_max_pids: int - """ - - _validation = { - 'container_log_max_files': {'minimum': 2}, - } - - _attribute_map = { - 'cpu_manager_policy': {'key': 'cpuManagerPolicy', 'type': 'str'}, - 'cpu_cfs_quota': {'key': 'cpuCfsQuota', 'type': 'bool'}, - 'cpu_cfs_quota_period': {'key': 'cpuCfsQuotaPeriod', 'type': 'str'}, - 'image_gc_high_threshold': {'key': 'imageGcHighThreshold', 'type': 'int'}, - 'image_gc_low_threshold': {'key': 'imageGcLowThreshold', 'type': 'int'}, - 'topology_manager_policy': {'key': 'topologyManagerPolicy', 'type': 'str'}, - 'allowed_unsafe_sysctls': {'key': 'allowedUnsafeSysctls', 'type': '[str]'}, - 'fail_swap_on': {'key': 'failSwapOn', 'type': 'bool'}, - 'container_log_max_size_mb': {'key': 'containerLogMaxSizeMB', 'type': 'int'}, - 'container_log_max_files': {'key': 'containerLogMaxFiles', 'type': 'int'}, - 'pod_max_pids': {'key': 'podMaxPids', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(KubeletConfig, self).__init__(**kwargs) - self.cpu_manager_policy = kwargs.get('cpu_manager_policy', None) - self.cpu_cfs_quota = kwargs.get('cpu_cfs_quota', None) - self.cpu_cfs_quota_period = kwargs.get('cpu_cfs_quota_period', None) - self.image_gc_high_threshold = kwargs.get('image_gc_high_threshold', None) - self.image_gc_low_threshold = kwargs.get('image_gc_low_threshold', None) - self.topology_manager_policy = kwargs.get('topology_manager_policy', None) - self.allowed_unsafe_sysctls = kwargs.get('allowed_unsafe_sysctls', None) - self.fail_swap_on = kwargs.get('fail_swap_on', None) - self.container_log_max_size_mb = kwargs.get('container_log_max_size_mb', None) - self.container_log_max_files = kwargs.get('container_log_max_files', None) - self.pod_max_pids = kwargs.get('pod_max_pids', None) - - -class LinuxOSConfig(Model): - """OS configurations of Linux agent nodes. - - :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2021_03_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. - :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. - :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. - :type swap_file_size_mb: int - """ - - _attribute_map = { - 'sysctls': {'key': 'sysctls', 'type': 'SysctlConfig'}, - 'transparent_huge_page_enabled': {'key': 'transparentHugePageEnabled', 'type': 'str'}, - 'transparent_huge_page_defrag': {'key': 'transparentHugePageDefrag', 'type': 'str'}, - 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(LinuxOSConfig, self).__init__(**kwargs) - self.sysctls = kwargs.get('sysctls', None) - self.transparent_huge_page_enabled = kwargs.get('transparent_huge_page_enabled', None) - self.transparent_huge_page_defrag = kwargs.get('transparent_huge_page_defrag', None) - self.swap_file_size_mb = kwargs.get('swap_file_size_mb', None) - - -class MaintenanceConfiguration(SubResource): - """maintenance configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar system_data: The system meta data relating to this resource. - :vartype system_data: - ~azure.mgmt.containerservice.v2021_03_01.models.SystemData - :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2021_03_01.models.TimeInWeek] - :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2021_03_01.models.TimeSpan] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'time_in_week': {'key': 'properties.timeInWeek', 'type': '[TimeInWeek]'}, - 'not_allowed_time': {'key': 'properties.notAllowedTime', 'type': '[TimeSpan]'}, - } - - def __init__(self, **kwargs): - super(MaintenanceConfiguration, self).__init__(**kwargs) - self.system_data = None - self.time_in_week = kwargs.get('time_in_week', None) - self.not_allowed_time = kwargs.get('not_allowed_time', None) - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :param fqdn_subdomain: FQDN subdomain specified when creating private - cluster with custom private dns zone. - :type fqdn_subdomain: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy - config. - :vartype azure_portal_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAddonProfile] - :param pod_identity_profile: Profile of managed cluster pod identity. - :type pod_identity_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAADProfile - :param auto_upgrade_profile: Profile of auto upgrade configuration. - :type auto_upgrade_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param private_link_resources: Private link resources associated with the - cluster. - :type private_link_resources: - list[~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkResource] - :param disable_local_accounts: If set to true, getting static credential - will be disabled for this cluster. Expected to only be used for AAD - clusters. - :type disable_local_accounts: bool - :param http_proxy_config: Configurations for provisioning the cluster with - HTTP proxy servers. - :type http_proxy_config: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterHTTPProxyConfig - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterSKU - :param extended_location: The extended location of the Virtual Machine. - :type extended_location: - ~azure.mgmt.containerservice.v2021_03_01.models.ExtendedLocation - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - 'azure_portal_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn_subdomain': {'key': 'properties.fqdnSubdomain', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'azure_portal_fqdn': {'key': 'properties.azurePortalFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'private_link_resources': {'key': 'properties.privateLinkResources', 'type': '[PrivateLinkResource]'}, - 'disable_local_accounts': {'key': 'properties.disableLocalAccounts', 'type': 'bool'}, - 'http_proxy_config': {'key': 'properties.httpProxyConfig', 'type': 'ManagedClusterHTTPProxyConfig'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn_subdomain = kwargs.get('fqdn_subdomain', None) - self.fqdn = None - self.private_fqdn = None - self.azure_portal_fqdn = None - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - self.linux_profile = kwargs.get('linux_profile', None) - self.windows_profile = kwargs.get('windows_profile', None) - self.service_principal_profile = kwargs.get('service_principal_profile', None) - self.addon_profiles = kwargs.get('addon_profiles', None) - self.pod_identity_profile = kwargs.get('pod_identity_profile', None) - self.node_resource_group = kwargs.get('node_resource_group', None) - self.enable_rbac = kwargs.get('enable_rbac', None) - self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) - self.network_profile = kwargs.get('network_profile', None) - self.aad_profile = kwargs.get('aad_profile', None) - self.auto_upgrade_profile = kwargs.get('auto_upgrade_profile', None) - self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) - self.api_server_access_profile = kwargs.get('api_server_access_profile', None) - self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) - self.identity_profile = kwargs.get('identity_profile', None) - self.private_link_resources = kwargs.get('private_link_resources', None) - self.disable_local_accounts = kwargs.get('disable_local_accounts', None) - self.http_proxy_config = kwargs.get('http_proxy_config', None) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.extended_location = kwargs.get('extended_location', None) - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = kwargs.get('managed', None) - self.enable_azure_rbac = kwargs.get('enable_azure_rbac', None) - self.admin_group_object_ids = kwargs.get('admin_group_object_ids', None) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) - self.server_app_secret = kwargs.get('server_app_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.config = kwargs.get('config', None) - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. - :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' - :type os_sku: str or ~azure.mgmt.containerservice.v2021_03_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_03_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - :param enable_fips: Whether to use FIPS enabled OS - :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' - :type gpu_instance_profile: str or - ~azure.mgmt.containerservice.v2021_03_01.models.GPUInstanceProfile - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'os_sku': {'key': 'osSKU', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, - 'enable_fips': {'key': 'enableFIPS', 'type': 'bool'}, - 'gpu_instance_profile': {'key': 'gpuInstanceProfile', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.vm_size = kwargs.get('vm_size', None) - self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.os_disk_type = kwargs.get('os_disk_type', None) - self.kubelet_disk_type = kwargs.get('kubelet_disk_type', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) - self.pod_subnet_id = kwargs.get('pod_subnet_id', None) - self.max_pods = kwargs.get('max_pods', None) - self.os_type = kwargs.get('os_type', "Linux") - self.os_sku = kwargs.get('os_sku', None) - self.max_count = kwargs.get('max_count', None) - self.min_count = kwargs.get('min_count', None) - self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.type = kwargs.get('type', None) - self.mode = kwargs.get('mode', None) - self.orchestrator_version = kwargs.get('orchestrator_version', None) - self.node_image_version = None - self.upgrade_settings = kwargs.get('upgrade_settings', None) - self.provisioning_state = None - self.power_state = None - self.availability_zones = kwargs.get('availability_zones', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) - self.node_public_ip_prefix_id = kwargs.get('node_public_ip_prefix_id', None) - self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") - self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) - self.tags = kwargs.get('tags', None) - self.node_labels = kwargs.get('node_labels', None) - self.node_taints = kwargs.get('node_taints', None) - self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) - self.kubelet_config = kwargs.get('kubelet_config', None) - self.linux_os_config = kwargs.get('linux_os_config', None) - self.enable_encryption_at_host = kwargs.get('enable_encryption_at_host', None) - self.enable_fips = kwargs.get('enable_fips', None) - self.gpu_instance_profile = kwargs.get('gpu_instance_profile', None) - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. - :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' - :type os_sku: str or ~azure.mgmt.containerservice.v2021_03_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_03_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - :param enable_fips: Whether to use FIPS enabled OS - :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' - :type gpu_instance_profile: str or - ~azure.mgmt.containerservice.v2021_03_01.models.GPUInstanceProfile - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'os_sku': {'key': 'osSKU', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, - 'enable_fips': {'key': 'enableFIPS', 'type': 'bool'}, - 'gpu_instance_profile': {'key': 'gpuInstanceProfile', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - :param private_dns_zone: Private dns zone mode for private cluster. - :type private_dns_zone: str - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) - self.enable_private_cluster = kwargs.get('enable_private_cluster', None) - self.private_dns_zone = kwargs.get('private_dns_zone', None) - - -class ManagedClusterAutoUpgradeProfile(Model): - """Auto upgrade profile for a managed cluster. - - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'node-image', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2021_03_01.models.UpgradeChannel - """ - - _attribute_map = { - 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) - self.upgrade_channel = kwargs.get('upgrade_channel', None) - - -class ManagedClusterHTTPProxyConfig(Model): - """Configurations for provisioning the cluster with HTTP proxy servers. - - :param http_proxy: HTTP proxy server endpoint to use. - :type http_proxy: str - :param https_proxy: HTTPS proxy server endpoint to use. - :type https_proxy: str - :param no_proxy: Endpoints that should not go through proxy. - :type no_proxy: list[str] - :param trusted_ca: Alternative CA cert to use for connecting to proxy - servers. - :type trusted_ca: str - """ - - _attribute_map = { - 'http_proxy': {'key': 'httpProxy', 'type': 'str'}, - 'https_proxy': {'key': 'httpsProxy', 'type': 'str'}, - 'no_proxy': {'key': 'noProxy', 'type': '[str]'}, - 'trusted_ca': {'key': 'trustedCa', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterHTTPProxyConfig, self).__init__(**kwargs) - self.http_proxy = kwargs.get('http_proxy', None) - self.https_proxy = kwargs.get('https_proxy', None) - self.no_proxy = kwargs.get('no_proxy', None) - self.trusted_ca = kwargs.get('trusted_ca', None) - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2021_03_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) - self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2021_03_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2021_03_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) - - -class ManagedClusterPodIdentity(Model): - """ManagedClusterPodIdentity. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity. - :type name: str - :param namespace: Required. Namespace of the pod identity. - :type namespace: str - :param binding_selector: Binding selector to use for the - AzureIdentityBinding resource. - :type binding_selector: str - :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2021_03_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentityProvisioningState - :ivar provisioning_info: - :vartype provisioning_info: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentityProvisioningInfo - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'identity': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_info': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'binding_selector': {'key': 'bindingSelector', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'UserAssignedIdentity'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentity, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.binding_selector = kwargs.get('binding_selector', None) - self.identity = kwargs.get('identity', None) - self.provisioning_state = None - self.provisioning_info = None - - -class ManagedClusterPodIdentityException(Model): - """ManagedClusterPodIdentityException. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity exception. - :type name: str - :param namespace: Required. Namespace of the pod identity exception. - :type namespace: str - :param pod_labels: Required. Pod labels to match. - :type pod_labels: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'pod_labels': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentityException, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.pod_labels = kwargs.get('pod_labels', None) - - -class ManagedClusterPodIdentityProfile(Model): - """ManagedClusterPodIdentityProfile. - - :param enabled: Whether the pod identity addon is enabled. - :type enabled: bool - :param allow_network_plugin_kubenet: Customer consent for enabling AAD pod - identity addon in cluster using Kubenet network plugin. - :type allow_network_plugin_kubenet: bool - :param user_assigned_identities: User assigned pod identity settings. - :type user_assigned_identities: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. - :type user_assigned_identity_exceptions: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentityException] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'allow_network_plugin_kubenet': {'key': 'allowNetworkPluginKubenet', 'type': 'bool'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '[ManagedClusterPodIdentity]'}, - 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.allow_network_plugin_kubenet = kwargs.get('allow_network_plugin_kubenet', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - self.user_assigned_identity_exceptions = kwargs.get('user_assigned_identity_exceptions', None) - - -class ManagedClusterPodIdentityProvisioningInfo(Model): - """ManagedClusterPodIdentityProvisioningInfo. - - :param error: Pod identity assignment error (if any). - :type error: ~azure.mgmt.containerservice.v2021_03_01.models.CloudError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudError'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', "Linux") - self.upgrades = kwargs.get('upgrades', None) - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) - self.is_preview = kwargs.get('is_preview', None) - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'priority', 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2021_03_01.models.Expander - :param max_empty_bulk_delete: - :type max_empty_bulk_delete: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - :param max_node_provision_time: - :type max_node_provision_time: str - :param max_total_unready_percentage: - :type max_total_unready_percentage: str - :param new_pod_scale_up_delay: - :type new_pod_scale_up_delay: str - :param ok_total_unready_count: - :type ok_total_unready_count: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param skip_nodes_with_local_storage: - :type skip_nodes_with_local_storage: str - :param skip_nodes_with_system_pods: - :type skip_nodes_with_system_pods: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'expander': {'key': 'expander', 'type': 'str'}, - 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - 'max_node_provision_time': {'key': 'max-node-provision-time', 'type': 'str'}, - 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, - 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, - 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, - 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) - self.expander = kwargs.get('expander', None) - self.max_empty_bulk_delete = kwargs.get('max_empty_bulk_delete', None) - self.max_graceful_termination_sec = kwargs.get('max_graceful_termination_sec', None) - self.max_node_provision_time = kwargs.get('max_node_provision_time', None) - self.max_total_unready_percentage = kwargs.get('max_total_unready_percentage', None) - self.new_pod_scale_up_delay = kwargs.get('new_pod_scale_up_delay', None) - self.ok_total_unready_count = kwargs.get('ok_total_unready_count', None) - self.scan_interval = kwargs.get('scan_interval', None) - self.scale_down_delay_after_add = kwargs.get('scale_down_delay_after_add', None) - self.scale_down_delay_after_delete = kwargs.get('scale_down_delay_after_delete', None) - self.scale_down_delay_after_failure = kwargs.get('scale_down_delay_after_failure', None) - self.scale_down_unneeded_time = kwargs.get('scale_down_unneeded_time', None) - self.scale_down_unready_time = kwargs.get('scale_down_unready_time', None) - self.scale_down_utilization_threshold = kwargs.get('scale_down_utilization_threshold', None) - self.skip_nodes_with_local_storage = kwargs.get('skip_nodes_with_local_storage', None) - self.skip_nodes_with_system_pods = kwargs.get('skip_nodes_with_system_pods', None) - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.secret = kwargs.get('secret', None) - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" - :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.LicenseType - :param enable_csi_proxy: Whether to enable CSI proxy. - :type enable_csi_proxy: bool - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'enable_csi_proxy': {'key': 'enableCSIProxy', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.admin_password = kwargs.get('admin_password', None) - self.license_type = kwargs.get('license_type', None) - self.enable_csi_proxy = kwargs.get('enable_csi_proxy', None) - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class OSOptionProfile(Model): - """The OS option profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the OS option profile. - :vartype id: str - :ivar name: Name of the OS option profile. - :vartype name: str - :ivar type: Type of the OS option profile. - :vartype type: str - :param os_option_property_list: Required. The list of OS option - properties. - :type os_option_property_list: - list[~azure.mgmt.containerservice.v2021_03_01.models.OSOptionProperty] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'os_option_property_list': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'os_option_property_list': {'key': 'properties.osOptionPropertyList', 'type': '[OSOptionProperty]'}, - } - - def __init__(self, **kwargs): - super(OSOptionProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.os_option_property_list = kwargs.get('os_option_property_list', None) - - -class OSOptionProperty(Model): - """OS option property. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. OS type. - :type os_type: str - :param enable_fips_image: Required. Whether FIPS image is enabled. - :type enable_fips_image: bool - """ - - _validation = { - 'os_type': {'required': True}, - 'enable_fips_image': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'os-type', 'type': 'str'}, - 'enable_fips_image': {'key': 'enable-fips-image', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(OSOptionProperty, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.enable_fips_image = kwargs.get('enable_fips_image', None) - - -class PowerState(Model): - """Describes the Power State of the cluster. - - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' - :type code: str or ~azure.mgmt.containerservice.v2021_03_01.models.Code - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PowerState, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, **kwargs): - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkResource(Model): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The ID of the private link resource. - :type id: str - :param name: The name of the private link resource. - :type name: str - :param type: The resource type. - :type type: str - :param group_id: The group ID of the resource. - :type group_id: str - :param required_members: RequiredMembers of the resource - :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. - :vartype private_link_service_id: str - """ - - _validation = { - 'private_link_service_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.group_id = kwargs.get('group_id', None) - self.required_members = kwargs.get('required_members', None) - self.private_link_service_id = None - - -class PrivateLinkResourcesListResult(Model): - """A list of private link resources. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResourcesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class RunCommandRequest(Model): - """run command request. - - All required parameters must be populated in order to send to Azure. - - :param command: Required. command to run. - :type command: str - :param context: base64 encoded zip file, contains files required by the - command - :type context: str - :param cluster_token: AuthToken issued for AKS AAD Server App. - :type cluster_token: str - """ - - _validation = { - 'command': {'required': True}, - } - - _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'cluster_token': {'key': 'clusterToken', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandRequest, self).__init__(**kwargs) - self.command = kwargs.get('command', None) - self.context = kwargs.get('context', None) - self.cluster_token = kwargs.get('cluster_token', None) - - -class RunCommandResult(Model): - """run command result. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: command id. - :vartype id: str - :ivar provisioning_state: provisioning State - :vartype provisioning_state: str - :ivar exit_code: exit code of the command - :vartype exit_code: int - :ivar started_at: time when the command started. - :vartype started_at: datetime - :ivar finished_at: time when the command finished. - :vartype finished_at: datetime - :ivar logs: command output. - :vartype logs: str - :ivar reason: explain why provisioningState is set to failed (if so). - :vartype reason: str - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'exit_code': {'readonly': True}, - 'started_at': {'readonly': True}, - 'finished_at': {'readonly': True}, - 'logs': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'exit_code': {'key': 'properties.exitCode', 'type': 'int'}, - 'started_at': {'key': 'properties.startedAt', 'type': 'iso-8601'}, - 'finished_at': {'key': 'properties.finishedAt', 'type': 'iso-8601'}, - 'logs': {'key': 'properties.logs', 'type': 'str'}, - 'reason': {'key': 'properties.reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunCommandResult, self).__init__(**kwargs) - self.id = None - self.provisioning_state = None - self.exit_code = None - self.started_at = None - self.finished_at = None - self.logs = None - self.reason = None - - -class SysctlConfig(Model): - """Sysctl settings for Linux agent nodes. - - :param net_core_somaxconn: Sysctl setting net.core.somaxconn. - :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. - :type net_core_netdev_max_backlog: int - :param net_core_rmem_default: Sysctl setting net.core.rmem_default. - :type net_core_rmem_default: int - :param net_core_rmem_max: Sysctl setting net.core.rmem_max. - :type net_core_rmem_max: int - :param net_core_wmem_default: Sysctl setting net.core.wmem_default. - :type net_core_wmem_default: int - :param net_core_wmem_max: Sysctl setting net.core.wmem_max. - :type net_core_wmem_max: int - :param net_core_optmem_max: Sysctl setting net.core.optmem_max. - :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. - :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. - :type net_ipv4_tcp_max_tw_buckets: int - :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. - :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. - :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. - :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. - :type net_ipv4_tcpkeepalive_intvl: int - :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. - :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. - :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. - :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. - :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. - :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. - :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. - :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. - :type fs_inotify_max_user_watches: int - :param fs_file_max: Sysctl setting fs.file-max. - :type fs_file_max: int - :param fs_aio_max_nr: Sysctl setting fs.aio-max-nr. - :type fs_aio_max_nr: int - :param fs_nr_open: Sysctl setting fs.nr_open. - :type fs_nr_open: int - :param kernel_threads_max: Sysctl setting kernel.threads-max. - :type kernel_threads_max: int - :param vm_max_map_count: Sysctl setting vm.max_map_count. - :type vm_max_map_count: int - :param vm_swappiness: Sysctl setting vm.swappiness. - :type vm_swappiness: int - :param vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. - :type vm_vfs_cache_pressure: int - """ - - _attribute_map = { - 'net_core_somaxconn': {'key': 'netCoreSomaxconn', 'type': 'int'}, - 'net_core_netdev_max_backlog': {'key': 'netCoreNetdevMaxBacklog', 'type': 'int'}, - 'net_core_rmem_default': {'key': 'netCoreRmemDefault', 'type': 'int'}, - 'net_core_rmem_max': {'key': 'netCoreRmemMax', 'type': 'int'}, - 'net_core_wmem_default': {'key': 'netCoreWmemDefault', 'type': 'int'}, - 'net_core_wmem_max': {'key': 'netCoreWmemMax', 'type': 'int'}, - 'net_core_optmem_max': {'key': 'netCoreOptmemMax', 'type': 'int'}, - 'net_ipv4_tcp_max_syn_backlog': {'key': 'netIpv4TcpMaxSynBacklog', 'type': 'int'}, - 'net_ipv4_tcp_max_tw_buckets': {'key': 'netIpv4TcpMaxTwBuckets', 'type': 'int'}, - 'net_ipv4_tcp_fin_timeout': {'key': 'netIpv4TcpFinTimeout', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_time': {'key': 'netIpv4TcpKeepaliveTime', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_probes': {'key': 'netIpv4TcpKeepaliveProbes', 'type': 'int'}, - 'net_ipv4_tcpkeepalive_intvl': {'key': 'netIpv4TcpkeepaliveIntvl', 'type': 'int'}, - 'net_ipv4_tcp_tw_reuse': {'key': 'netIpv4TcpTwReuse', 'type': 'bool'}, - 'net_ipv4_ip_local_port_range': {'key': 'netIpv4IpLocalPortRange', 'type': 'str'}, - 'net_ipv4_neigh_default_gc_thresh1': {'key': 'netIpv4NeighDefaultGcThresh1', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh2': {'key': 'netIpv4NeighDefaultGcThresh2', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh3': {'key': 'netIpv4NeighDefaultGcThresh3', 'type': 'int'}, - 'net_netfilter_nf_conntrack_max': {'key': 'netNetfilterNfConntrackMax', 'type': 'int'}, - 'net_netfilter_nf_conntrack_buckets': {'key': 'netNetfilterNfConntrackBuckets', 'type': 'int'}, - 'fs_inotify_max_user_watches': {'key': 'fsInotifyMaxUserWatches', 'type': 'int'}, - 'fs_file_max': {'key': 'fsFileMax', 'type': 'int'}, - 'fs_aio_max_nr': {'key': 'fsAioMaxNr', 'type': 'int'}, - 'fs_nr_open': {'key': 'fsNrOpen', 'type': 'int'}, - 'kernel_threads_max': {'key': 'kernelThreadsMax', 'type': 'int'}, - 'vm_max_map_count': {'key': 'vmMaxMapCount', 'type': 'int'}, - 'vm_swappiness': {'key': 'vmSwappiness', 'type': 'int'}, - 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SysctlConfig, self).__init__(**kwargs) - self.net_core_somaxconn = kwargs.get('net_core_somaxconn', None) - self.net_core_netdev_max_backlog = kwargs.get('net_core_netdev_max_backlog', None) - self.net_core_rmem_default = kwargs.get('net_core_rmem_default', None) - self.net_core_rmem_max = kwargs.get('net_core_rmem_max', None) - self.net_core_wmem_default = kwargs.get('net_core_wmem_default', None) - self.net_core_wmem_max = kwargs.get('net_core_wmem_max', None) - self.net_core_optmem_max = kwargs.get('net_core_optmem_max', None) - self.net_ipv4_tcp_max_syn_backlog = kwargs.get('net_ipv4_tcp_max_syn_backlog', None) - self.net_ipv4_tcp_max_tw_buckets = kwargs.get('net_ipv4_tcp_max_tw_buckets', None) - self.net_ipv4_tcp_fin_timeout = kwargs.get('net_ipv4_tcp_fin_timeout', None) - self.net_ipv4_tcp_keepalive_time = kwargs.get('net_ipv4_tcp_keepalive_time', None) - self.net_ipv4_tcp_keepalive_probes = kwargs.get('net_ipv4_tcp_keepalive_probes', None) - self.net_ipv4_tcpkeepalive_intvl = kwargs.get('net_ipv4_tcpkeepalive_intvl', None) - self.net_ipv4_tcp_tw_reuse = kwargs.get('net_ipv4_tcp_tw_reuse', None) - self.net_ipv4_ip_local_port_range = kwargs.get('net_ipv4_ip_local_port_range', None) - self.net_ipv4_neigh_default_gc_thresh1 = kwargs.get('net_ipv4_neigh_default_gc_thresh1', None) - self.net_ipv4_neigh_default_gc_thresh2 = kwargs.get('net_ipv4_neigh_default_gc_thresh2', None) - self.net_ipv4_neigh_default_gc_thresh3 = kwargs.get('net_ipv4_neigh_default_gc_thresh3', None) - self.net_netfilter_nf_conntrack_max = kwargs.get('net_netfilter_nf_conntrack_max', None) - self.net_netfilter_nf_conntrack_buckets = kwargs.get('net_netfilter_nf_conntrack_buckets', None) - self.fs_inotify_max_user_watches = kwargs.get('fs_inotify_max_user_watches', None) - self.fs_file_max = kwargs.get('fs_file_max', None) - self.fs_aio_max_nr = kwargs.get('fs_aio_max_nr', None) - self.fs_nr_open = kwargs.get('fs_nr_open', None) - self.kernel_threads_max = kwargs.get('kernel_threads_max', None) - self.vm_max_map_count = kwargs.get('vm_max_map_count', None) - self.vm_swappiness = kwargs.get('vm_swappiness', None) - self.vm_vfs_cache_pressure = kwargs.get('vm_vfs_cache_pressure', None) - - -class SystemData(Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' - :type last_modified_by_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. - :type last_modified_at: datetime - """ - - _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(SystemData, self).__init__(**kwargs) - self.created_by = kwargs.get('created_by', None) - self.created_by_type = kwargs.get('created_by_type', None) - self.created_at = kwargs.get('created_at', None) - self.last_modified_by = kwargs.get('last_modified_by', None) - self.last_modified_by_type = kwargs.get('last_modified_by_type', None) - self.last_modified_at = kwargs.get('last_modified_at', None) - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - - -class TimeInWeek(Model): - """Time in a week. - - :param day: A day in a week. Possible values include: 'Sunday', 'Monday', - 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' - :type day: str or ~azure.mgmt.containerservice.v2021_03_01.models.WeekDay - :param hour_slots: hour slots in a day. - :type hour_slots: list[int] - """ - - _attribute_map = { - 'day': {'key': 'day', 'type': 'str'}, - 'hour_slots': {'key': 'hourSlots', 'type': '[int]'}, - } - - def __init__(self, **kwargs): - super(TimeInWeek, self).__init__(**kwargs) - self.day = kwargs.get('day', None) - self.hour_slots = kwargs.get('hour_slots', None) - - -class TimeSpan(Model): - """The time span with start and end properties. - - :param start: The start of a time span - :type start: datetime - :param end: The end of a time span - :type end: datetime - """ - - _attribute_map = { - 'start': {'key': 'start', 'type': 'iso-8601'}, - 'end': {'key': 'end', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(TimeSpan, self).__init__(**kwargs) - self.start = kwargs.get('start', None) - self.end = kwargs.get('end', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_models_py3.py deleted file mode 100644 index 7a3f7e34645..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_models_py3.py +++ /dev/null @@ -1,3212 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class SubResource(Model): - """Reference to another subresource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class AgentPool(SubResource): - """Agent Pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. - :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' - :type os_sku: str or ~azure.mgmt.containerservice.v2021_03_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_03_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - :param enable_fips: Whether to use FIPS enabled OS - :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' - :type gpu_instance_profile: str or - ~azure.mgmt.containerservice.v2021_03_01.models.GPUInstanceProfile - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count': {'key': 'properties.count', 'type': 'int'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'properties.kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'properties.podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'os_sku': {'key': 'properties.osSKU', 'type': 'str'}, - 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, - 'min_count': {'key': 'properties.minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, - 'mode': {'key': 'properties.mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'properties.nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'properties.kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'properties.linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'properties.enableEncryptionAtHost', 'type': 'bool'}, - 'enable_fips': {'key': 'properties.enableFIPS', 'type': 'bool'}, - 'gpu_instance_profile': {'key': 'properties.gpuInstanceProfile', 'type': 'str'}, - } - - def __init__(self, *, count: int=None, vm_size: str=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", os_sku=None, max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, node_public_ip_prefix_id: str=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, enable_fips: bool=None, gpu_instance_profile=None, **kwargs) -> None: - super(AgentPool, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type - self.kubelet_disk_type = kubelet_disk_type - self.vnet_subnet_id = vnet_subnet_id - self.pod_subnet_id = pod_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.os_sku = os_sku - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = None - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.power_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.node_public_ip_prefix_id = node_public_ip_prefix_id - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - self.kubelet_config = kubelet_config - self.linux_os_config = linux_os_config - self.enable_encryption_at_host = enable_encryption_at_host - self.enable_fips = enable_fips - self.gpu_instance_profile = gpu_instance_profile - - -class AgentPoolAvailableVersions(Model): - """The list of available versions for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Id of the agent pool available versions. - :vartype id: str - :ivar name: Name of the agent pool available versions. - :vartype name: str - :ivar type: Type of the agent pool available versions. - :vartype type: str - :param agent_pool_versions: List of versions available for agent pool. - :type agent_pool_versions: - list[~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, - } - - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: - super(AgentPoolAvailableVersions, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.agent_pool_versions = agent_pool_versions - - -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): - """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. - - :param default: Whether this version is the default agent pool version. - :type default: bool - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'default': {'key': 'default', 'type': 'bool'}, - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) - self.default = default - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeProfile(Model): - """The list of available upgrades for an agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the agent pool upgrade profile. - :vartype id: str - :ivar name: Name of the agent pool upgrade profile. - :vartype name: str - :ivar type: Type of the agent pool upgrade profile. - :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. - :type latest_node_image_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, - 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, - } - - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, latest_node_image_version: str=None, **kwargs) -> None: - super(AgentPoolUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kubernetes_version = kubernetes_version - self.os_type = os_type - self.upgrades = upgrades - self.latest_node_image_version = latest_node_image_version - - -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): - """AgentPoolUpgradeProfilePropertiesUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class AgentPoolUpgradeSettings(Model): - """Settings for upgrading an agentpool. - - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default - :type max_surge: str - """ - - _attribute_map = { - 'max_surge': {'key': 'maxSurge', 'type': 'str'}, - } - - def __init__(self, *, max_surge: str=None, **kwargs) -> None: - super(AgentPoolUpgradeSettings, self).__init__(**kwargs) - self.max_surge = max_surge - - -class CloudError(Model): - """An error response from the Container service. - - :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2021_03_01.models.CloudErrorBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudErrorBody'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): - """An error response from the Container service. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. - :type target: str - :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2021_03_01.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class ContainerServiceDiagnosticsProfile(Model): - """Profile for diagnostics on the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. - :type vm_diagnostics: - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceVMDiagnostics - """ - - _validation = { - 'vm_diagnostics': {'required': True}, - } - - _attribute_map = { - 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, - } - - def __init__(self, *, vm_diagnostics, **kwargs) -> None: - super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = vm_diagnostics - - -class ContainerServiceLinuxProfile(Model): - """Profile for Linux VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. The administrator username to use for - Linux VMs. - :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceSshConfiguration - """ - - _validation = { - 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, - 'ssh': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, - } - - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: - super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.ssh = ssh - - -class ContainerServiceMasterProfile(Model): - """Profile for the container service master. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. - :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' - :type vm_size: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. - :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . - :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceStorageProfileTypes - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - """ - - _validation = { - 'dns_prefix': {'required': True}, - 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - } - - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: - super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = count - self.dns_prefix = dns_prefix - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.vnet_subnet_id = vnet_subnet_id - self.first_consecutive_static_ip = first_consecutive_static_ip - self.storage_profile = storage_profile - self.fqdn = None - - -class ContainerServiceNetworkProfile(Model): - """Profile of network configuration. - - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2021_03_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2021_03_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2021_03_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . - :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . - :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . - :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . - :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2021_03_01.models.LoadBalancerSku - :param load_balancer_profile: Profile of the cluster load balancer. - :type load_balancer_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterLoadBalancerProfile - """ - - _validation = { - 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - } - - _attribute_map = { - 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, - 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, - 'network_mode': {'key': 'networkMode', 'type': 'str'}, - 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'outbound_type': {'key': 'outboundType', 'type': 'str'}, - 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, - 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, - } - - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: - super(ContainerServiceNetworkProfile, self).__init__(**kwargs) - self.network_plugin = network_plugin - self.network_policy = network_policy - self.network_mode = network_mode - self.pod_cidr = pod_cidr - self.service_cidr = service_cidr - self.dns_service_ip = dns_service_ip - self.docker_bridge_cidr = docker_bridge_cidr - self.outbound_type = outbound_type - self.load_balancer_sku = load_balancer_sku - self.load_balancer_profile = load_balancer_profile - - -class ContainerServiceSshConfiguration(Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to Azure. - - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. - :type public_keys: - list[~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceSshPublicKey] - """ - - _validation = { - 'public_keys': {'required': True}, - } - - _attribute_map = { - 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, - } - - def __init__(self, *, public_keys, **kwargs) -> None: - super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = public_keys - - -class ContainerServiceSshPublicKey(Model): - """Contains information about SSH certificate public key data. - - All required parameters must be populated in order to send to Azure. - - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. - :type key_data: str - """ - - _validation = { - 'key_data': {'required': True}, - } - - _attribute_map = { - 'key_data': {'key': 'keyData', 'type': 'str'}, - } - - def __init__(self, *, key_data: str, **kwargs) -> None: - super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = key_data - - -class ContainerServiceVMDiagnostics(Model): - """Profile for diagnostics on the container service VMs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. - :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. - :vartype storage_uri: str - """ - - _validation = { - 'enabled': {'required': True}, - 'storage_uri': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'storage_uri': {'key': 'storageUri', 'type': 'str'}, - } - - def __init__(self, *, enabled: bool, **kwargs) -> None: - super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = enabled - self.storage_uri = None - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None - - -class CredentialResults(Model): - """The list of credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2021_03_01.models.CredentialResult] - """ - - _validation = { - 'kubeconfigs': {'readonly': True}, - } - - _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None - - -class ExtendedLocation(Model): - """The complex type of the extended location. - - :param name: The name of the extended location. - :type name: str - :param type: The type of the extended location. Possible values include: - 'EdgeZone' - :type type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ExtendedLocationTypes - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, type=None, **kwargs) -> None: - super(ExtendedLocation, self).__init__(**kwargs) - self.name = name - self.type = type - - -class KubeletConfig(Model): - """Kubelet configurations of agent nodes. - - :param cpu_manager_policy: CPU Manager policy to use. - :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. - :type cpu_cfs_quota: bool - :param cpu_cfs_quota_period: Sets CPU CFS quota period value. - :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. - :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. - :type image_gc_low_threshold: int - :param topology_manager_policy: Topology Manager policy to use. - :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). - :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. - :type fail_swap_on: bool - :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of - container log file before it is rotated. - :type container_log_max_size_mb: int - :param container_log_max_files: The maximum number of container log files - that can be present for a container. The number must be ≥ 2. - :type container_log_max_files: int - :param pod_max_pids: The maximum number of processes per pod. - :type pod_max_pids: int - """ - - _validation = { - 'container_log_max_files': {'minimum': 2}, - } - - _attribute_map = { - 'cpu_manager_policy': {'key': 'cpuManagerPolicy', 'type': 'str'}, - 'cpu_cfs_quota': {'key': 'cpuCfsQuota', 'type': 'bool'}, - 'cpu_cfs_quota_period': {'key': 'cpuCfsQuotaPeriod', 'type': 'str'}, - 'image_gc_high_threshold': {'key': 'imageGcHighThreshold', 'type': 'int'}, - 'image_gc_low_threshold': {'key': 'imageGcLowThreshold', 'type': 'int'}, - 'topology_manager_policy': {'key': 'topologyManagerPolicy', 'type': 'str'}, - 'allowed_unsafe_sysctls': {'key': 'allowedUnsafeSysctls', 'type': '[str]'}, - 'fail_swap_on': {'key': 'failSwapOn', 'type': 'bool'}, - 'container_log_max_size_mb': {'key': 'containerLogMaxSizeMB', 'type': 'int'}, - 'container_log_max_files': {'key': 'containerLogMaxFiles', 'type': 'int'}, - 'pod_max_pids': {'key': 'podMaxPids', 'type': 'int'}, - } - - def __init__(self, *, cpu_manager_policy: str=None, cpu_cfs_quota: bool=None, cpu_cfs_quota_period: str=None, image_gc_high_threshold: int=None, image_gc_low_threshold: int=None, topology_manager_policy: str=None, allowed_unsafe_sysctls=None, fail_swap_on: bool=None, container_log_max_size_mb: int=None, container_log_max_files: int=None, pod_max_pids: int=None, **kwargs) -> None: - super(KubeletConfig, self).__init__(**kwargs) - self.cpu_manager_policy = cpu_manager_policy - self.cpu_cfs_quota = cpu_cfs_quota - self.cpu_cfs_quota_period = cpu_cfs_quota_period - self.image_gc_high_threshold = image_gc_high_threshold - self.image_gc_low_threshold = image_gc_low_threshold - self.topology_manager_policy = topology_manager_policy - self.allowed_unsafe_sysctls = allowed_unsafe_sysctls - self.fail_swap_on = fail_swap_on - self.container_log_max_size_mb = container_log_max_size_mb - self.container_log_max_files = container_log_max_files - self.pod_max_pids = pod_max_pids - - -class LinuxOSConfig(Model): - """OS configurations of Linux agent nodes. - - :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2021_03_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. - :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. - :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. - :type swap_file_size_mb: int - """ - - _attribute_map = { - 'sysctls': {'key': 'sysctls', 'type': 'SysctlConfig'}, - 'transparent_huge_page_enabled': {'key': 'transparentHugePageEnabled', 'type': 'str'}, - 'transparent_huge_page_defrag': {'key': 'transparentHugePageDefrag', 'type': 'str'}, - 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, - } - - def __init__(self, *, sysctls=None, transparent_huge_page_enabled: str=None, transparent_huge_page_defrag: str=None, swap_file_size_mb: int=None, **kwargs) -> None: - super(LinuxOSConfig, self).__init__(**kwargs) - self.sysctls = sysctls - self.transparent_huge_page_enabled = transparent_huge_page_enabled - self.transparent_huge_page_defrag = transparent_huge_page_defrag - self.swap_file_size_mb = swap_file_size_mb - - -class MaintenanceConfiguration(SubResource): - """maintenance configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar system_data: The system meta data relating to this resource. - :vartype system_data: - ~azure.mgmt.containerservice.v2021_03_01.models.SystemData - :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2021_03_01.models.TimeInWeek] - :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2021_03_01.models.TimeSpan] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'time_in_week': {'key': 'properties.timeInWeek', 'type': '[TimeInWeek]'}, - 'not_allowed_time': {'key': 'properties.notAllowedTime', 'type': '[TimeSpan]'}, - } - - def __init__(self, *, time_in_week=None, not_allowed_time=None, **kwargs) -> None: - super(MaintenanceConfiguration, self).__init__(**kwargs) - self.system_data = None - self.time_in_week = time_in_week - self.not_allowed_time = not_allowed_time - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ManagedCluster(Resource): - """Managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. - :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. - :type kubernetes_version: str - :param dns_prefix: DNS prefix specified when creating the managed cluster. - :type dns_prefix: str - :param fqdn_subdomain: FQDN subdomain specified when creating private - cluster with custom private dns zone. - :type fqdn_subdomain: str - :ivar fqdn: FQDN for the master pool. - :vartype fqdn: str - :ivar private_fqdn: FQDN of private cluster. - :vartype private_fqdn: str - :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy - config. - :vartype azure_portal_fqdn: str - :param agent_pool_profiles: Properties of the agent pool. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. - :type linux_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. - :type windows_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. - :type service_principal_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterServicePrincipalProfile - :param addon_profiles: Profile of managed cluster add-on. - :type addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAddonProfile] - :param pod_identity_profile: Profile of managed cluster pod identity. - :type pod_identity_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. - :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. - :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. - :type enable_pod_security_policy: bool - :param network_profile: Profile of network configuration. - :type network_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ContainerServiceNetworkProfile - :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAADProfile - :param auto_upgrade_profile: Profile of auto upgrade configuration. - :type auto_upgrade_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled - :type auto_scaler_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. - :type api_server_access_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. - :type disk_encryption_set_id: str - :param identity_profile: Identities associated with the cluster. - :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param private_link_resources: Private link resources associated with the - cluster. - :type private_link_resources: - list[~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkResource] - :param disable_local_accounts: If set to true, getting static credential - will be disabled for this cluster. Expected to only be used for AAD - clusters. - :type disable_local_accounts: bool - :param http_proxy_config: Configurations for provisioning the cluster with - HTTP proxy servers. - :type http_proxy_config: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterHTTPProxyConfig - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterIdentity - :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterSKU - :param extended_location: The extended location of the Virtual Machine. - :type extended_location: - ~azure.mgmt.containerservice.v2021_03_01.models.ExtendedLocation - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'max_agent_pools': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'private_fqdn': {'readonly': True}, - 'azure_portal_fqdn': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, - 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, - 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, - 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, - 'fqdn_subdomain': {'key': 'properties.fqdnSubdomain', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, - 'azure_portal_fqdn': {'key': 'properties.azurePortalFQDN', 'type': 'str'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, - 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, - 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, - 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, - 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, - 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, - 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, - 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, - 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, - 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, - 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, - 'private_link_resources': {'key': 'properties.privateLinkResources', 'type': '[PrivateLinkResource]'}, - 'disable_local_accounts': {'key': 'properties.disableLocalAccounts', 'type': 'bool'}, - 'http_proxy_config': {'key': 'properties.httpProxyConfig', 'type': 'ManagedClusterHTTPProxyConfig'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, - 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, - 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, - } - - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, fqdn_subdomain: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, pod_identity_profile=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_upgrade_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, private_link_resources=None, disable_local_accounts: bool=None, http_proxy_config=None, identity=None, sku=None, extended_location=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None - self.kubernetes_version = kubernetes_version - self.dns_prefix = dns_prefix - self.fqdn_subdomain = fqdn_subdomain - self.fqdn = None - self.private_fqdn = None - self.azure_portal_fqdn = None - self.agent_pool_profiles = agent_pool_profiles - self.linux_profile = linux_profile - self.windows_profile = windows_profile - self.service_principal_profile = service_principal_profile - self.addon_profiles = addon_profiles - self.pod_identity_profile = pod_identity_profile - self.node_resource_group = node_resource_group - self.enable_rbac = enable_rbac - self.enable_pod_security_policy = enable_pod_security_policy - self.network_profile = network_profile - self.aad_profile = aad_profile - self.auto_upgrade_profile = auto_upgrade_profile - self.auto_scaler_profile = auto_scaler_profile - self.api_server_access_profile = api_server_access_profile - self.disk_encryption_set_id = disk_encryption_set_id - self.identity_profile = identity_profile - self.private_link_resources = private_link_resources - self.disable_local_accounts = disable_local_accounts - self.http_proxy_config = http_proxy_config - self.identity = identity - self.sku = sku - self.extended_location = extended_location - - -class ManagedClusterAADProfile(Model): - """AADProfile specifies attributes for Azure Active Directory integration. - - :param managed: Whether to enable managed AAD. - :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. - :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] - :param client_app_id: The client AAD application ID. - :type client_app_id: str - :param server_app_id: The server AAD application ID. - :type server_app_id: str - :param server_app_secret: The server AAD application secret. - :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. - :type tenant_id: str - """ - - _attribute_map = { - 'managed': {'key': 'managed', 'type': 'bool'}, - 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, - 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, - 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantID', 'type': 'str'}, - } - - def __init__(self, *, managed: bool=None, enable_azure_rbac: bool=None, admin_group_object_ids=None, client_app_id: str=None, server_app_id: str=None, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(ManagedClusterAADProfile, self).__init__(**kwargs) - self.managed = managed - self.enable_azure_rbac = enable_azure_rbac - self.admin_group_object_ids = admin_group_object_ids - self.client_app_id = client_app_id - self.server_app_id = server_app_id - self.server_app_secret = server_app_secret - self.tenant_id = tenant_id - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config - - -class ManagedClusterAddonProfile(Model): - """A Kubernetes add-on profile for a managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the add-on is enabled or not. - :type enabled: bool - :param config: Key-value pairs for configuring an add-on. - :type config: dict[str, str] - :ivar identity: Information of user assigned identity used by this add-on. - :vartype identity: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAddonProfileIdentity - """ - - _validation = { - 'enabled': {'required': True}, - 'identity': {'readonly': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'config': {'key': 'config', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, - } - - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: - super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = enabled - self.config = config - self.identity = None - - -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - -class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - """Information of user assigned identity used by this add-on. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterAgentPoolProfileProperties(Model): - """Properties for the container service agent pool profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. - :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' - :type os_sku: str or ~azure.mgmt.containerservice.v2021_03_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_03_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - :param enable_fips: Whether to use FIPS enabled OS - :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' - :type gpu_instance_profile: str or - ~azure.mgmt.containerservice.v2021_03_01.models.GPUInstanceProfile - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'os_sku': {'key': 'osSKU', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, - 'enable_fips': {'key': 'enableFIPS', 'type': 'bool'}, - 'gpu_instance_profile': {'key': 'gpuInstanceProfile', 'type': 'str'}, - } - - def __init__(self, *, count: int=None, vm_size: str=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", os_sku=None, max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, node_public_ip_prefix_id: str=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, enable_fips: bool=None, gpu_instance_profile=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) - self.count = count - self.vm_size = vm_size - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type - self.kubelet_disk_type = kubelet_disk_type - self.vnet_subnet_id = vnet_subnet_id - self.pod_subnet_id = pod_subnet_id - self.max_pods = max_pods - self.os_type = os_type - self.os_sku = os_sku - self.max_count = max_count - self.min_count = min_count - self.enable_auto_scaling = enable_auto_scaling - self.type = type - self.mode = mode - self.orchestrator_version = orchestrator_version - self.node_image_version = None - self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.power_state = None - self.availability_zones = availability_zones - self.enable_node_public_ip = enable_node_public_ip - self.node_public_ip_prefix_id = node_public_ip_prefix_id - self.scale_set_priority = scale_set_priority - self.scale_set_eviction_policy = scale_set_eviction_policy - self.spot_max_price = spot_max_price - self.tags = tags - self.node_labels = node_labels - self.node_taints = node_taints - self.proximity_placement_group_id = proximity_placement_group_id - self.kubelet_config = kubelet_config - self.linux_os_config = linux_os_config - self.enable_encryption_at_host = enable_encryption_at_host - self.enable_fips = enable_fips - self.gpu_instance_profile = gpu_instance_profile - - -class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - """Profile for the container service agent pool. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 100 (inclusive) for user pools and in - the range of 1 to 100 (inclusive) for system pools. The default value is - 1. - :type count: int - :param vm_size: Size of agent VMs. - :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. - :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods - :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. - :type pod_subnet_id: str - :param max_pods: Maximum number of pods that can run on a node. - :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' - :type os_sku: str or ~azure.mgmt.containerservice.v2021_03_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling - :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling - :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler - :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. - :type orchestrator_version: str - :ivar node_image_version: Version of node image - :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool - :type upgrade_settings: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. - :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. - :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes - :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. - :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . - :type scale_set_priority: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . - :type scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. - :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. - :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. - :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. - :type node_taints: list[str] - :param proximity_placement_group_id: The ID for Proximity Placement Group. - :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_03_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_03_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost - :type enable_encryption_at_host: bool - :param enable_fips: Whether to use FIPS enabled OS - :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' - :type gpu_instance_profile: str or - ~azure.mgmt.containerservice.v2021_03_01.models.GPUInstanceProfile - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. - :type name: str - """ - - _validation = { - 'node_image_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'power_state': {'readonly': True}, - 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, - 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, - 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, - 'max_pods': {'key': 'maxPods', 'type': 'int'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'os_sku': {'key': 'osSKU', 'type': 'str'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, - 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, - 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'PowerState'}, - 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, - 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, - 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, - 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, - 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, - 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, - 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, - 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, - 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, - 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, - 'enable_fips': {'key': 'enableFIPS', 'type': 'bool'}, - 'gpu_instance_profile': {'key': 'gpuInstanceProfile', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str, count: int=None, vm_size: str=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", os_sku=None, max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, node_public_ip_prefix_id: str=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, enable_fips: bool=None, gpu_instance_profile=None, **kwargs) -> None: - super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, os_disk_type=os_disk_type, kubelet_disk_type=kubelet_disk_type, vnet_subnet_id=vnet_subnet_id, pod_subnet_id=pod_subnet_id, max_pods=max_pods, os_type=os_type, os_sku=os_sku, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, upgrade_settings=upgrade_settings, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, node_public_ip_prefix_id=node_public_ip_prefix_id, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, proximity_placement_group_id=proximity_placement_group_id, kubelet_config=kubelet_config, linux_os_config=linux_os_config, enable_encryption_at_host=enable_encryption_at_host, enable_fips=enable_fips, gpu_instance_profile=gpu_instance_profile, **kwargs) - self.name = name - - -class ManagedClusterAPIServerAccessProfile(Model): - """Access profile for managed cluster API server. - - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. - :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. - :type enable_private_cluster: bool - :param private_dns_zone: Private dns zone mode for private cluster. - :type private_dns_zone: str - """ - - _attribute_map = { - 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, - 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, - 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, - } - - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, private_dns_zone: str=None, **kwargs) -> None: - super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) - self.authorized_ip_ranges = authorized_ip_ranges - self.enable_private_cluster = enable_private_cluster - self.private_dns_zone = private_dns_zone - - -class ManagedClusterAutoUpgradeProfile(Model): - """Auto upgrade profile for a managed cluster. - - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'node-image', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2021_03_01.models.UpgradeChannel - """ - - _attribute_map = { - 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, - } - - def __init__(self, *, upgrade_channel=None, **kwargs) -> None: - super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) - self.upgrade_channel = upgrade_channel - - -class ManagedClusterHTTPProxyConfig(Model): - """Configurations for provisioning the cluster with HTTP proxy servers. - - :param http_proxy: HTTP proxy server endpoint to use. - :type http_proxy: str - :param https_proxy: HTTPS proxy server endpoint to use. - :type https_proxy: str - :param no_proxy: Endpoints that should not go through proxy. - :type no_proxy: list[str] - :param trusted_ca: Alternative CA cert to use for connecting to proxy - servers. - :type trusted_ca: str - """ - - _attribute_map = { - 'http_proxy': {'key': 'httpProxy', 'type': 'str'}, - 'https_proxy': {'key': 'httpsProxy', 'type': 'str'}, - 'no_proxy': {'key': 'noProxy', 'type': '[str]'}, - 'trusted_ca': {'key': 'trustedCa', 'type': 'str'}, - } - - def __init__(self, *, http_proxy: str=None, https_proxy: str=None, no_proxy=None, trusted_ca: str=None, **kwargs) -> None: - super(ManagedClusterHTTPProxyConfig, self).__init__(**kwargs) - self.http_proxy = http_proxy - self.https_proxy = https_proxy - self.no_proxy = no_proxy - self.trusted_ca = trusted_ca - - -class ManagedClusterIdentity(Model): - """Identity for the managed cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. - :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. - :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, - } - - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: - super(ManagedClusterIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.user_assigned_identities = user_assigned_identities - - -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class ManagedClusterLoadBalancerProfile(Model): - """Profile of the managed cluster load balancer. - - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. - :type outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: - list[~azure.mgmt.containerservice.v2021_03_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . - :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . - :type idle_timeout_in_minutes: int - """ - - _validation = { - 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, - 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, - } - - _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, - 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, - 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, - } - - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips - self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips - self.allocated_outbound_ports = allocated_outbound_ports - self.idle_timeout_in_minutes = idle_timeout_in_minutes - - -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): - """Desired managed outbound IPs for the cluster load balancer. - - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . - :type count: int - """ - - _validation = { - 'count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, count: int=1, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) - self.count = count - - -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): - """Desired outbound IP Prefix resources for the cluster load balancer. - - :param public_ip_prefixes: A list of public IP prefix resources. - :type public_ip_prefixes: - list[~azure.mgmt.containerservice.v2021_03_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) - self.public_ip_prefixes = public_ip_prefixes - - -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): - """Desired outbound IP resources for the cluster load balancer. - - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2021_03_01.models.ResourceReference] - """ - - _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, - } - - def __init__(self, *, public_ips=None, **kwargs) -> None: - super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips - - -class ManagedClusterPodIdentity(Model): - """ManagedClusterPodIdentity. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity. - :type name: str - :param namespace: Required. Namespace of the pod identity. - :type namespace: str - :param binding_selector: Binding selector to use for the - AzureIdentityBinding resource. - :type binding_selector: str - :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2021_03_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentityProvisioningState - :ivar provisioning_info: - :vartype provisioning_info: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentityProvisioningInfo - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'identity': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_info': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'binding_selector': {'key': 'bindingSelector', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'UserAssignedIdentity'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, - } - - def __init__(self, *, name: str, namespace: str, identity, binding_selector: str=None, **kwargs) -> None: - super(ManagedClusterPodIdentity, self).__init__(**kwargs) - self.name = name - self.namespace = namespace - self.binding_selector = binding_selector - self.identity = identity - self.provisioning_state = None - self.provisioning_info = None - - -class ManagedClusterPodIdentityException(Model): - """ManagedClusterPodIdentityException. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the pod identity exception. - :type name: str - :param namespace: Required. Namespace of the pod identity exception. - :type namespace: str - :param pod_labels: Required. Pod labels to match. - :type pod_labels: dict[str, str] - """ - - _validation = { - 'name': {'required': True}, - 'namespace': {'required': True}, - 'pod_labels': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, - } - - def __init__(self, *, name: str, namespace: str, pod_labels, **kwargs) -> None: - super(ManagedClusterPodIdentityException, self).__init__(**kwargs) - self.name = name - self.namespace = namespace - self.pod_labels = pod_labels - - -class ManagedClusterPodIdentityProfile(Model): - """ManagedClusterPodIdentityProfile. - - :param enabled: Whether the pod identity addon is enabled. - :type enabled: bool - :param allow_network_plugin_kubenet: Customer consent for enabling AAD pod - identity addon in cluster using Kubenet network plugin. - :type allow_network_plugin_kubenet: bool - :param user_assigned_identities: User assigned pod identity settings. - :type user_assigned_identities: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. - :type user_assigned_identity_exceptions: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPodIdentityException] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'allow_network_plugin_kubenet': {'key': 'allowNetworkPluginKubenet', 'type': 'bool'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '[ManagedClusterPodIdentity]'}, - 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, - } - - def __init__(self, *, enabled: bool=None, allow_network_plugin_kubenet: bool=None, user_assigned_identities=None, user_assigned_identity_exceptions=None, **kwargs) -> None: - super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) - self.enabled = enabled - self.allow_network_plugin_kubenet = allow_network_plugin_kubenet - self.user_assigned_identities = user_assigned_identities - self.user_assigned_identity_exceptions = user_assigned_identity_exceptions - - -class ManagedClusterPodIdentityProvisioningInfo(Model): - """ManagedClusterPodIdentityProvisioningInfo. - - :param error: Pod identity assignment error (if any). - :type error: ~azure.mgmt.containerservice.v2021_03_01.models.CloudError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CloudError'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) - self.error = error - - -class ManagedClusterPoolUpgradeProfile(Model): - """The list of available upgrade versions. - - All required parameters must be populated in order to send to Azure. - - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). - :type kubernetes_version: str - :param name: Pool name. - :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. - :type upgrades: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - """ - - _validation = { - 'kubernetes_version': {'required': True}, - 'os_type': {'required': True}, - } - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, - } - - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.name = name - self.os_type = os_type - self.upgrades = upgrades - - -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): - """ManagedClusterPoolUpgradeProfileUpgradesItem. - - :param kubernetes_version: Kubernetes version (major, minor, patch). - :type kubernetes_version: str - :param is_preview: Whether Kubernetes version is currently in preview. - :type is_preview: bool - """ - - _attribute_map = { - 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, - 'is_preview': {'key': 'isPreview', 'type': 'bool'}, - } - - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: - super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.is_preview = is_preview - - -class ManagedClusterPropertiesAutoScalerProfile(Model): - """Parameters to be applied to the cluster-autoscaler when enabled. - - :param balance_similar_node_groups: - :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'priority', 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2021_03_01.models.Expander - :param max_empty_bulk_delete: - :type max_empty_bulk_delete: str - :param max_graceful_termination_sec: - :type max_graceful_termination_sec: str - :param max_node_provision_time: - :type max_node_provision_time: str - :param max_total_unready_percentage: - :type max_total_unready_percentage: str - :param new_pod_scale_up_delay: - :type new_pod_scale_up_delay: str - :param ok_total_unready_count: - :type ok_total_unready_count: str - :param scan_interval: - :type scan_interval: str - :param scale_down_delay_after_add: - :type scale_down_delay_after_add: str - :param scale_down_delay_after_delete: - :type scale_down_delay_after_delete: str - :param scale_down_delay_after_failure: - :type scale_down_delay_after_failure: str - :param scale_down_unneeded_time: - :type scale_down_unneeded_time: str - :param scale_down_unready_time: - :type scale_down_unready_time: str - :param scale_down_utilization_threshold: - :type scale_down_utilization_threshold: str - :param skip_nodes_with_local_storage: - :type skip_nodes_with_local_storage: str - :param skip_nodes_with_system_pods: - :type skip_nodes_with_system_pods: str - """ - - _attribute_map = { - 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, - 'expander': {'key': 'expander', 'type': 'str'}, - 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, - 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, - 'max_node_provision_time': {'key': 'max-node-provision-time', 'type': 'str'}, - 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, - 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, - 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, - 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, - 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, - 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, - 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, - 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, - 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, - 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, - 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, - 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, - } - - def __init__(self, *, balance_similar_node_groups: str=None, expander=None, max_empty_bulk_delete: str=None, max_graceful_termination_sec: str=None, max_node_provision_time: str=None, max_total_unready_percentage: str=None, new_pod_scale_up_delay: str=None, ok_total_unready_count: str=None, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, skip_nodes_with_local_storage: str=None, skip_nodes_with_system_pods: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) - self.balance_similar_node_groups = balance_similar_node_groups - self.expander = expander - self.max_empty_bulk_delete = max_empty_bulk_delete - self.max_graceful_termination_sec = max_graceful_termination_sec - self.max_node_provision_time = max_node_provision_time - self.max_total_unready_percentage = max_total_unready_percentage - self.new_pod_scale_up_delay = new_pod_scale_up_delay - self.ok_total_unready_count = ok_total_unready_count - self.scan_interval = scan_interval - self.scale_down_delay_after_add = scale_down_delay_after_add - self.scale_down_delay_after_delete = scale_down_delay_after_delete - self.scale_down_delay_after_failure = scale_down_delay_after_failure - self.scale_down_unneeded_time = scale_down_unneeded_time - self.scale_down_unready_time = scale_down_unready_time - self.scale_down_utilization_threshold = scale_down_utilization_threshold - self.skip_nodes_with_local_storage = skip_nodes_with_local_storage - self.skip_nodes_with_system_pods = skip_nodes_with_system_pods - - -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. - - All required parameters must be populated in order to send to Azure. - - :param client_id: Required. The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. - :type secret: str - """ - - _validation = { - 'client_id': {'required': True}, - } - - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: - super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = client_id - self.secret = secret - - -class ManagedClusterSKU(Model): - """ManagedClusterSKU. - - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterSKUTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name=None, tier=None, **kwargs) -> None: - super(ManagedClusterSKU, self).__init__(**kwargs) - self.name = name - self.tier = tier - - -class ManagedClusterUpgradeProfile(Model): - """The list of available upgrades for compute pools. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of upgrade profile. - :vartype id: str - :ivar name: Name of upgrade profile. - :vartype name: str - :ivar type: Type of upgrade profile. - :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. - :type control_plane_profile: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. - :type agent_pool_profiles: - list[~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPoolUpgradeProfile] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'control_plane_profile': {'required': True}, - 'agent_pool_profiles': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, - 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, - } - - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: - super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.control_plane_profile = control_plane_profile - self.agent_pool_profiles = agent_pool_profiles - - -class ManagedClusterWindowsProfile(Model): - """Profile for Windows VMs in the container service cluster. - - All required parameters must be populated in order to send to Azure. - - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters - :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" - :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.LicenseType - :param enable_csi_proxy: Whether to enable CSI proxy. - :type enable_csi_proxy: bool - """ - - _validation = { - 'admin_username': {'required': True}, - } - - _attribute_map = { - 'admin_username': {'key': 'adminUsername', 'type': 'str'}, - 'admin_password': {'key': 'adminPassword', 'type': 'str'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'enable_csi_proxy': {'key': 'enableCSIProxy', 'type': 'bool'}, - } - - def __init__(self, *, admin_username: str, admin_password: str=None, license_type=None, enable_csi_proxy: bool=None, **kwargs) -> None: - super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = admin_username - self.admin_password = admin_password - self.license_type = license_type - self.enable_csi_proxy = enable_csi_proxy - - -class OperationValue(Model): - """Describes the properties of a Compute Operation value. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar origin: The origin of the compute operation. - :vartype origin: str - :ivar name: The name of the compute operation. - :vartype name: str - :ivar operation: The display name of the compute operation. - :vartype operation: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar description: The description of the operation. - :vartype description: str - :ivar provider: The resource provider for the operation. - :vartype provider: str - """ - - _validation = { - 'origin': {'readonly': True}, - 'name': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - 'provider': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'operation': {'key': 'display.operation', 'type': 'str'}, - 'resource': {'key': 'display.resource', 'type': 'str'}, - 'description': {'key': 'display.description', 'type': 'str'}, - 'provider': {'key': 'display.provider', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationValue, self).__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None - - -class OSOptionProfile(Model): - """The OS option profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Id of the OS option profile. - :vartype id: str - :ivar name: Name of the OS option profile. - :vartype name: str - :ivar type: Type of the OS option profile. - :vartype type: str - :param os_option_property_list: Required. The list of OS option - properties. - :type os_option_property_list: - list[~azure.mgmt.containerservice.v2021_03_01.models.OSOptionProperty] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'os_option_property_list': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'os_option_property_list': {'key': 'properties.osOptionPropertyList', 'type': '[OSOptionProperty]'}, - } - - def __init__(self, *, os_option_property_list, **kwargs) -> None: - super(OSOptionProfile, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.os_option_property_list = os_option_property_list - - -class OSOptionProperty(Model): - """OS option property. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. OS type. - :type os_type: str - :param enable_fips_image: Required. Whether FIPS image is enabled. - :type enable_fips_image: bool - """ - - _validation = { - 'os_type': {'required': True}, - 'enable_fips_image': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'os-type', 'type': 'str'}, - 'enable_fips_image': {'key': 'enable-fips-image', 'type': 'bool'}, - } - - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs) -> None: - super(OSOptionProperty, self).__init__(**kwargs) - self.os_type = os_type - self.enable_fips_image = enable_fips_image - - -class PowerState(Model): - """Describes the Power State of the cluster. - - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' - :type code: str or ~azure.mgmt.containerservice.v2021_03_01.models.Code - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, *, code=None, **kwargs) -> None: - super(PowerState, self).__init__(**kwargs) - self.code = code - - -class PrivateEndpoint(Model): - """Private endpoint which a connection belongs to. - - :param id: The resource Id for private endpoint - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = id - - -class PrivateEndpointConnection(Model): - """A private endpoint connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The ID of the private endpoint connection. - :vartype id: str - :ivar name: The name of the private endpoint connection. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpointConnectionProvisioningState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkServiceConnectionState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__(self, *, private_link_service_connection_state, private_endpoint=None, **kwargs) -> None: - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - - -class PrivateEndpointConnectionListResult(Model): - """A list of private endpoint connections. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = value - - -class PrivateLinkResource(Model): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The ID of the private link resource. - :type id: str - :param name: The name of the private link resource. - :type name: str - :param type: The resource type. - :type type: str - :param group_id: The group ID of the resource. - :type group_id: str - :param required_members: RequiredMembers of the resource - :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. - :vartype private_link_service_id: str - """ - - _validation = { - 'private_link_service_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, type: str=None, group_id: str=None, required_members=None, **kwargs) -> None: - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = id - self.name = name - self.type = type - self.group_id = group_id - self.required_members = required_members - self.private_link_service_id = None - - -class PrivateLinkResourcesListResult(Model): - """A list of private link resources. - - :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PrivateLinkResourcesListResult, self).__init__(**kwargs) - self.value = value - - -class PrivateLinkServiceConnectionState(Model): - """The state of a private link service connection. - - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2021_03_01.models.ConnectionStatus - :param description: The private link service connection description. - :type description: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, status=None, description: str=None, **kwargs) -> None: - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = status - self.description = description - - -class ResourceReference(Model): - """A reference to an Azure resource. - - :param id: The fully qualified Azure resource id. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - - -class RunCommandRequest(Model): - """run command request. - - All required parameters must be populated in order to send to Azure. - - :param command: Required. command to run. - :type command: str - :param context: base64 encoded zip file, contains files required by the - command - :type context: str - :param cluster_token: AuthToken issued for AKS AAD Server App. - :type cluster_token: str - """ - - _validation = { - 'command': {'required': True}, - } - - _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'cluster_token': {'key': 'clusterToken', 'type': 'str'}, - } - - def __init__(self, *, command: str, context: str=None, cluster_token: str=None, **kwargs) -> None: - super(RunCommandRequest, self).__init__(**kwargs) - self.command = command - self.context = context - self.cluster_token = cluster_token - - -class RunCommandResult(Model): - """run command result. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: command id. - :vartype id: str - :ivar provisioning_state: provisioning State - :vartype provisioning_state: str - :ivar exit_code: exit code of the command - :vartype exit_code: int - :ivar started_at: time when the command started. - :vartype started_at: datetime - :ivar finished_at: time when the command finished. - :vartype finished_at: datetime - :ivar logs: command output. - :vartype logs: str - :ivar reason: explain why provisioningState is set to failed (if so). - :vartype reason: str - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'exit_code': {'readonly': True}, - 'started_at': {'readonly': True}, - 'finished_at': {'readonly': True}, - 'logs': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'exit_code': {'key': 'properties.exitCode', 'type': 'int'}, - 'started_at': {'key': 'properties.startedAt', 'type': 'iso-8601'}, - 'finished_at': {'key': 'properties.finishedAt', 'type': 'iso-8601'}, - 'logs': {'key': 'properties.logs', 'type': 'str'}, - 'reason': {'key': 'properties.reason', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RunCommandResult, self).__init__(**kwargs) - self.id = None - self.provisioning_state = None - self.exit_code = None - self.started_at = None - self.finished_at = None - self.logs = None - self.reason = None - - -class SysctlConfig(Model): - """Sysctl settings for Linux agent nodes. - - :param net_core_somaxconn: Sysctl setting net.core.somaxconn. - :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. - :type net_core_netdev_max_backlog: int - :param net_core_rmem_default: Sysctl setting net.core.rmem_default. - :type net_core_rmem_default: int - :param net_core_rmem_max: Sysctl setting net.core.rmem_max. - :type net_core_rmem_max: int - :param net_core_wmem_default: Sysctl setting net.core.wmem_default. - :type net_core_wmem_default: int - :param net_core_wmem_max: Sysctl setting net.core.wmem_max. - :type net_core_wmem_max: int - :param net_core_optmem_max: Sysctl setting net.core.optmem_max. - :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. - :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. - :type net_ipv4_tcp_max_tw_buckets: int - :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. - :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. - :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. - :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. - :type net_ipv4_tcpkeepalive_intvl: int - :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. - :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. - :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. - :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. - :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. - :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. - :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. - :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. - :type fs_inotify_max_user_watches: int - :param fs_file_max: Sysctl setting fs.file-max. - :type fs_file_max: int - :param fs_aio_max_nr: Sysctl setting fs.aio-max-nr. - :type fs_aio_max_nr: int - :param fs_nr_open: Sysctl setting fs.nr_open. - :type fs_nr_open: int - :param kernel_threads_max: Sysctl setting kernel.threads-max. - :type kernel_threads_max: int - :param vm_max_map_count: Sysctl setting vm.max_map_count. - :type vm_max_map_count: int - :param vm_swappiness: Sysctl setting vm.swappiness. - :type vm_swappiness: int - :param vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. - :type vm_vfs_cache_pressure: int - """ - - _attribute_map = { - 'net_core_somaxconn': {'key': 'netCoreSomaxconn', 'type': 'int'}, - 'net_core_netdev_max_backlog': {'key': 'netCoreNetdevMaxBacklog', 'type': 'int'}, - 'net_core_rmem_default': {'key': 'netCoreRmemDefault', 'type': 'int'}, - 'net_core_rmem_max': {'key': 'netCoreRmemMax', 'type': 'int'}, - 'net_core_wmem_default': {'key': 'netCoreWmemDefault', 'type': 'int'}, - 'net_core_wmem_max': {'key': 'netCoreWmemMax', 'type': 'int'}, - 'net_core_optmem_max': {'key': 'netCoreOptmemMax', 'type': 'int'}, - 'net_ipv4_tcp_max_syn_backlog': {'key': 'netIpv4TcpMaxSynBacklog', 'type': 'int'}, - 'net_ipv4_tcp_max_tw_buckets': {'key': 'netIpv4TcpMaxTwBuckets', 'type': 'int'}, - 'net_ipv4_tcp_fin_timeout': {'key': 'netIpv4TcpFinTimeout', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_time': {'key': 'netIpv4TcpKeepaliveTime', 'type': 'int'}, - 'net_ipv4_tcp_keepalive_probes': {'key': 'netIpv4TcpKeepaliveProbes', 'type': 'int'}, - 'net_ipv4_tcpkeepalive_intvl': {'key': 'netIpv4TcpkeepaliveIntvl', 'type': 'int'}, - 'net_ipv4_tcp_tw_reuse': {'key': 'netIpv4TcpTwReuse', 'type': 'bool'}, - 'net_ipv4_ip_local_port_range': {'key': 'netIpv4IpLocalPortRange', 'type': 'str'}, - 'net_ipv4_neigh_default_gc_thresh1': {'key': 'netIpv4NeighDefaultGcThresh1', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh2': {'key': 'netIpv4NeighDefaultGcThresh2', 'type': 'int'}, - 'net_ipv4_neigh_default_gc_thresh3': {'key': 'netIpv4NeighDefaultGcThresh3', 'type': 'int'}, - 'net_netfilter_nf_conntrack_max': {'key': 'netNetfilterNfConntrackMax', 'type': 'int'}, - 'net_netfilter_nf_conntrack_buckets': {'key': 'netNetfilterNfConntrackBuckets', 'type': 'int'}, - 'fs_inotify_max_user_watches': {'key': 'fsInotifyMaxUserWatches', 'type': 'int'}, - 'fs_file_max': {'key': 'fsFileMax', 'type': 'int'}, - 'fs_aio_max_nr': {'key': 'fsAioMaxNr', 'type': 'int'}, - 'fs_nr_open': {'key': 'fsNrOpen', 'type': 'int'}, - 'kernel_threads_max': {'key': 'kernelThreadsMax', 'type': 'int'}, - 'vm_max_map_count': {'key': 'vmMaxMapCount', 'type': 'int'}, - 'vm_swappiness': {'key': 'vmSwappiness', 'type': 'int'}, - 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, - } - - def __init__(self, *, net_core_somaxconn: int=None, net_core_netdev_max_backlog: int=None, net_core_rmem_default: int=None, net_core_rmem_max: int=None, net_core_wmem_default: int=None, net_core_wmem_max: int=None, net_core_optmem_max: int=None, net_ipv4_tcp_max_syn_backlog: int=None, net_ipv4_tcp_max_tw_buckets: int=None, net_ipv4_tcp_fin_timeout: int=None, net_ipv4_tcp_keepalive_time: int=None, net_ipv4_tcp_keepalive_probes: int=None, net_ipv4_tcpkeepalive_intvl: int=None, net_ipv4_tcp_tw_reuse: bool=None, net_ipv4_ip_local_port_range: str=None, net_ipv4_neigh_default_gc_thresh1: int=None, net_ipv4_neigh_default_gc_thresh2: int=None, net_ipv4_neigh_default_gc_thresh3: int=None, net_netfilter_nf_conntrack_max: int=None, net_netfilter_nf_conntrack_buckets: int=None, fs_inotify_max_user_watches: int=None, fs_file_max: int=None, fs_aio_max_nr: int=None, fs_nr_open: int=None, kernel_threads_max: int=None, vm_max_map_count: int=None, vm_swappiness: int=None, vm_vfs_cache_pressure: int=None, **kwargs) -> None: - super(SysctlConfig, self).__init__(**kwargs) - self.net_core_somaxconn = net_core_somaxconn - self.net_core_netdev_max_backlog = net_core_netdev_max_backlog - self.net_core_rmem_default = net_core_rmem_default - self.net_core_rmem_max = net_core_rmem_max - self.net_core_wmem_default = net_core_wmem_default - self.net_core_wmem_max = net_core_wmem_max - self.net_core_optmem_max = net_core_optmem_max - self.net_ipv4_tcp_max_syn_backlog = net_ipv4_tcp_max_syn_backlog - self.net_ipv4_tcp_max_tw_buckets = net_ipv4_tcp_max_tw_buckets - self.net_ipv4_tcp_fin_timeout = net_ipv4_tcp_fin_timeout - self.net_ipv4_tcp_keepalive_time = net_ipv4_tcp_keepalive_time - self.net_ipv4_tcp_keepalive_probes = net_ipv4_tcp_keepalive_probes - self.net_ipv4_tcpkeepalive_intvl = net_ipv4_tcpkeepalive_intvl - self.net_ipv4_tcp_tw_reuse = net_ipv4_tcp_tw_reuse - self.net_ipv4_ip_local_port_range = net_ipv4_ip_local_port_range - self.net_ipv4_neigh_default_gc_thresh1 = net_ipv4_neigh_default_gc_thresh1 - self.net_ipv4_neigh_default_gc_thresh2 = net_ipv4_neigh_default_gc_thresh2 - self.net_ipv4_neigh_default_gc_thresh3 = net_ipv4_neigh_default_gc_thresh3 - self.net_netfilter_nf_conntrack_max = net_netfilter_nf_conntrack_max - self.net_netfilter_nf_conntrack_buckets = net_netfilter_nf_conntrack_buckets - self.fs_inotify_max_user_watches = fs_inotify_max_user_watches - self.fs_file_max = fs_file_max - self.fs_aio_max_nr = fs_aio_max_nr - self.fs_nr_open = fs_nr_open - self.kernel_threads_max = kernel_threads_max - self.vm_max_map_count = vm_max_map_count - self.vm_swappiness = vm_swappiness - self.vm_vfs_cache_pressure = vm_vfs_cache_pressure - - -class SystemData(Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' - :type last_modified_by_type: str or - ~azure.mgmt.containerservice.v2021_03_01.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. - :type last_modified_at: datetime - """ - - _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: - super(SystemData, self).__init__(**kwargs) - self.created_by = created_by - self.created_by_type = created_by_type - self.created_at = created_at - self.last_modified_by = last_modified_by - self.last_modified_by_type = last_modified_by_type - self.last_modified_at = last_modified_at - - -class TagsObject(Model): - """Tags object for patch operations. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsObject, self).__init__(**kwargs) - self.tags = tags - - -class TimeInWeek(Model): - """Time in a week. - - :param day: A day in a week. Possible values include: 'Sunday', 'Monday', - 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' - :type day: str or ~azure.mgmt.containerservice.v2021_03_01.models.WeekDay - :param hour_slots: hour slots in a day. - :type hour_slots: list[int] - """ - - _attribute_map = { - 'day': {'key': 'day', 'type': 'str'}, - 'hour_slots': {'key': 'hourSlots', 'type': '[int]'}, - } - - def __init__(self, *, day=None, hour_slots=None, **kwargs) -> None: - super(TimeInWeek, self).__init__(**kwargs) - self.day = day - self.hour_slots = hour_slots - - -class TimeSpan(Model): - """The time span with start and end properties. - - :param start: The start of a time span - :type start: datetime - :param end: The end of a time span - :type end: datetime - """ - - _attribute_map = { - 'start': {'key': 'start', 'type': 'iso-8601'}, - 'end': {'key': 'end', 'type': 'iso-8601'}, - } - - def __init__(self, *, start=None, end=None, **kwargs) -> None: - super(TimeSpan, self).__init__(**kwargs) - self.start = start - self.end = end diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_paged_models.py deleted file mode 100644 index f923a1981eb..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/models/_paged_models.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class MaintenanceConfigurationPaged(Paged): - """ - A paging container for iterating over a list of :class:`MaintenanceConfiguration ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MaintenanceConfiguration]'} - } - - def __init__(self, *args, **kwargs): - - super(MaintenanceConfigurationPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_agent_pools_operations.py deleted file mode 100644 index 968f00fc4cd..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_agent_pools_operations.py +++ /dev/null @@ -1,610 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2021_03_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2021_03_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_03_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_03_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. - - Gets a list of supported versions for the specified agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} - - - def _upgrade_node_image_version_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.upgrade_node_image_version.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 202: - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def upgrade_node_image_version( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrade node image version of an agent pool to the latest. - - Upgrade node image version of an agent pool to the latest. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_03_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_03_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._upgrade_node_image_version_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_maintenance_configurations_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_maintenance_configurations_operations.py deleted file mode 100644 index 48f470ac8a6..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_maintenance_configurations_operations.py +++ /dev/null @@ -1,387 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class MaintenanceConfigurationsOperations(object): - """MaintenanceConfigurationsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01" - - self.config = config - - def list_by_managed_cluster( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of maintenance configurations in the specified managed - cluster. - - Gets a list of maintenance configurations in the specified managed - cluster. The operation returns properties of each maintenance - configuration. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of MaintenanceConfiguration - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.MaintenanceConfigurationPaged[~azure.mgmt.containerservice.v2021_03_01.models.MaintenanceConfiguration] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_managed_cluster.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.MaintenanceConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_managed_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'} - - def get( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, **operation_config): - """Gets the maintenance configuration. - - Gets the details of maintenance configurations by managed cluster and - resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param config_name: The name of the maintenance configuration. - :type config_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MaintenanceConfiguration or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.MaintenanceConfiguration - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, config_name, time_in_week=None, not_allowed_time=None, custom_headers=None, raw=False, **operation_config): - parameters = models.MaintenanceConfiguration(time_in_week=time_in_week, not_allowed_time=not_allowed_time) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'MaintenanceConfiguration') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, config_name, time_in_week=None, not_allowed_time=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a maintenance configurations. - - Creates or updates a maintenance configuration in the specified managed - cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param config_name: The name of the maintenance configuration. - :type config_name: str - :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2021_03_01.models.TimeInWeek] - :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2021_03_01.models.TimeSpan] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - MaintenanceConfiguration or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_03_01.models.MaintenanceConfiguration] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_03_01.models.MaintenanceConfiguration]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - time_in_week=time_in_week, - not_allowed_time=not_allowed_time, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a maintenance configuration. - - Deletes the maintenance configuration in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param config_name: The name of the maintenance configuration. - :type config_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_managed_clusters_operations.py deleted file mode 100644 index cf7bc5784f7..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,1539 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01" - - self.config = config - - def get_os_options( - self, location, resource_type=None, custom_headers=None, raw=False, **operation_config): - """Gets supported OS options in the specified subscription. - - Gets supported OS options in the specified subscription. - - :param location: The name of a supported Azure region. - :type location: str - :param resource_type: resource type for which the OS options needs to - be returned - :type resource_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OSOptionProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.OSOptionProfile or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_os_options.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if resource_type is not None: - query_parameters['resource-type'] = self._serialize.query("resource_type", resource_type, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('OSOptionProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_os_options.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_upgrade_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. **WARNING**: This API - will be deprecated. Instead use - [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) - or - [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) - . - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. - - Gets cluster user credential of the managed cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster monitoring user credential of a managed cluster. - - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_03_01.models.ManagedCluster]] - :raises: :class:`CloudError` - """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - - # Construct URL - url = self.reset_service_principal_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - - - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.reset_aad_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2021_03_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - - - def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Rotate certificates of a managed cluster. - - Rotate certificates of a managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} - - - def _stop_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def stop( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Stop Managed Cluster. - - Stops a Running Managed Cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} - - - def _start_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Start Managed Cluster. - - Starts a Stopped Managed Cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} - - - def _run_command_initial( - self, resource_group_name, resource_name, request_payload, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.run_command.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request_payload, 'RunCommandRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def run_command( - self, resource_group_name, resource_name, request_payload, custom_headers=None, raw=False, polling=True, **operation_config): - """Run Command against Managed Kubernetes Service. - - Submit a command to run against managed kubernetes service, it will - create a pod to run the command. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param request_payload: Parameters supplied to the RunCommand - operation. - :type request_payload: - ~azure.mgmt.containerservice.v2021_03_01.models.RunCommandRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RunCommandResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_03_01.models.RunCommandResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_03_01.models.RunCommandResult]] - :raises: :class:`CloudError` - """ - raw_result = self._run_command_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - request_payload=request_payload, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'} - - def get_command_result( - self, resource_group_name, resource_name, command_id, custom_headers=None, raw=False, **operation_config): - """Get command result. - - Get command result from previous runCommand invoke. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param command_id: Id of the command request. - :type command_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RunCommandResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.RunCommandResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_command_result.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'commandId': self._serialize.url("command_id", command_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_command_result.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_operations.py deleted file mode 100644 index e2784d91191..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2021_03_01.models.OperationValue] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_private_endpoint_connections_operations.py deleted file mode 100644 index f219423e72f..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_private_endpoint_connections_operations.py +++ /dev/null @@ -1,348 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class PrivateEndpointConnectionsOperations(object): - """PrivateEndpointConnectionsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private endpoint connections in the specified managed - cluster. - - Gets a list of private endpoint connections in the specified managed - cluster. The operation returns properties of each private endpoint - connection. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnectionListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpointConnectionListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} - - def get( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - """Gets the private endpoint connection. - - Gets the details of the private endpoint connection by managed cluster - and resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - def update( - self, resource_group_name, resource_name, private_endpoint_connection_name, private_link_service_connection_state, private_endpoint=None, custom_headers=None, raw=False, **operation_config): - """Updates a private endpoint connection. - - Updates a private endpoint connection in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param private_link_service_connection_state: A collection of - information about the state of the connection between service consumer - and provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkServiceConnectionState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpoint - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a private endpoint connection. - - Deletes the private endpoint connection in the specified managed - cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_private_link_resources_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_private_link_resources_operations.py deleted file mode 100644 index e5e5dbfc1bb..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_private_link_resources_operations.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class PrivateLinkResourcesOperations(object): - """PrivateLinkResourcesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private link resources in the specified managed cluster. - - Gets a list of private link resources in the specified managed cluster. - The operation returns properties of each private link resource. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResourcesListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkResourcesListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_resolve_private_link_service_id_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_resolve_private_link_service_id_operations.py deleted file mode 100644 index 37503ef6ba1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/operations/_resolve_private_link_service_id_operations.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ResolvePrivateLinkServiceIdOperations(object): - """ResolvePrivateLinkServiceIdOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01" - - self.config = config - - def post( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): - """Gets the private link service ID for the specified managed cluster. - - Gets the private link service ID the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters (name, groupId) supplied in order to - resolve a private link service ID. - :type parameters: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_03_01.models.PrivateLinkResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.post.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateLinkResource') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/version.py deleted file mode 100644 index f25a2116ec1..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_03_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2021-03-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/__init__.py old mode 100644 new mode 100755 index b7cb9d01cb1..eb3d7ba7a26 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/__init__.py @@ -1,19 +1,16 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._configuration import ContainerServiceClientConfiguration from ._container_service_client import ContainerServiceClient -__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION +__all__ = ['ContainerServiceClient'] +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/_configuration.py old mode 100644 new mode 100755 index e94fbc7005d..9a90721ebc2 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/_configuration.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/_configuration.py @@ -1,50 +1,70 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration -from .version import VERSION +from typing import TYPE_CHECKING +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient Note that all parameters used to create this instance are saved as instance attributes. - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str - :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) - super(ContainerServiceClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials + self.credential = credential self.subscription_id = subscription_id + self.api_version = "2021-05-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/_container_service_client.py old mode 100644 new mode 100755 index 19799dc92a8..c6f8ea5a9a8 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/_container_service_client.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/_container_service_client.py @@ -1,16 +1,22 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import ContainerServiceClientConfiguration from .operations import Operations @@ -23,59 +29,91 @@ from . import models -class ContainerServiceClient(SDKClient): +class ContainerServiceClient(object): """The Container Service Client. - :ivar config: Configuration for client. - :vartype config: ContainerServiceClientConfiguration - :ivar operations: Operations operations :vartype operations: azure.mgmt.containerservice.v2021_05_01.operations.Operations - :ivar managed_clusters: ManagedClusters operations + :ivar managed_clusters: ManagedClustersOperations operations :vartype managed_clusters: azure.mgmt.containerservice.v2021_05_01.operations.ManagedClustersOperations - :ivar maintenance_configurations: MaintenanceConfigurations operations + :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations :vartype maintenance_configurations: azure.mgmt.containerservice.v2021_05_01.operations.MaintenanceConfigurationsOperations - :ivar agent_pools: AgentPools operations + :ivar agent_pools: AgentPoolsOperations operations :vartype agent_pools: azure.mgmt.containerservice.v2021_05_01.operations.AgentPoolsOperations - :ivar private_endpoint_connections: PrivateEndpointConnections operations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: azure.mgmt.containerservice.v2021_05_01.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResources operations + :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.containerservice.v2021_05_01.operations.PrivateLinkResourcesOperations - :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceId operations + :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2021_05_01.operations.ResolvePrivateLinkServiceIdOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url) - super(ContainerServiceClient, self).__init__(self.config.credentials, self.config) + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2021-05-01' self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.maintenance_configurations = MaintenanceConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.agent_pools = AgentPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> ContainerServiceClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/__init__.py new file mode 100755 index 00000000000..4ad2bb20096 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._container_service_client import ContainerServiceClient +__all__ = ['ContainerServiceClient'] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/_configuration.py new file mode 100755 index 00000000000..de11b983ca1 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/_configuration.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-05-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/_container_service_client.py new file mode 100755 index 00000000000..6134e940c07 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/_container_service_client.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import ContainerServiceClientConfiguration +from .operations import Operations +from .operations import ManagedClustersOperations +from .operations import MaintenanceConfigurationsOperations +from .operations import AgentPoolsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import ResolvePrivateLinkServiceIdOperations +from .. import models + + +class ContainerServiceClient(object): + """The Container Service Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerservice.v2021_05_01.aio.operations.Operations + :ivar managed_clusters: ManagedClustersOperations operations + :vartype managed_clusters: azure.mgmt.containerservice.v2021_05_01.aio.operations.ManagedClustersOperations + :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations + :vartype maintenance_configurations: azure.mgmt.containerservice.v2021_05_01.aio.operations.MaintenanceConfigurationsOperations + :ivar agent_pools: AgentPoolsOperations operations + :vartype agent_pools: azure.mgmt.containerservice.v2021_05_01.aio.operations.AgentPoolsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.containerservice.v2021_05_01.aio.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.containerservice.v2021_05_01.aio.operations.PrivateLinkResourcesOperations + :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations + :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2021_05_01.aio.operations.ResolvePrivateLinkServiceIdOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.managed_clusters = ManagedClustersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.maintenance_configurations = MaintenanceConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.agent_pools = AgentPoolsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "ContainerServiceClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/__init__.py old mode 100644 new mode 100755 similarity index 95% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/__init__.py rename to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/__init__.py index d7bfa3f00fe..3942e0ca6a0 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/__init__.py @@ -1,12 +1,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from ._operations import Operations diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_agent_pools_operations.py new file mode 100755 index 00000000000..0509972712f --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_agent_pools_operations.py @@ -0,0 +1,689 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AgentPoolsOperations: + """AgentPoolsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AgentPoolListResult"]: + """Gets a list of agent pools in the specified managed cluster. + + Gets a list of agent pools in the specified managed cluster. The operation returns properties + of each agent pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPoolListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AgentPoolListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> "_models.AgentPool": + """Gets the agent pool. + + Gets the details of the agent pool by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPool, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: "_models.AgentPool", + **kwargs: Any + ) -> "_models.AgentPool": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AgentPool') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: "_models.AgentPool", + **kwargs: Any + ) -> AsyncLROPoller["_models.AgentPool"]: + """Creates or updates an agent pool. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :param parameters: Parameters supplied to the Create or Update an agent pool operation. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AgentPool or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an agent pool. + + Deletes the agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def get_upgrade_profile( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> "_models.AgentPoolUpgradeProfile": + """Gets upgrade profile for an agent pool. + + Gets the details of the upgrade profile for an agent pool with a specified resource group and + managed cluster name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_upgrade_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPoolUpgradeProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} # type: ignore + + async def get_available_agent_pool_versions( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.AgentPoolAvailableVersions": + """Gets a list of supported versions for the specified agent pool. + + Gets a list of supported versions for the specified agent pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolAvailableVersions, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolAvailableVersions + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolAvailableVersions"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_available_agent_pool_versions.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPoolAvailableVersions', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} # type: ignore + + async def _upgrade_node_image_version_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> Optional["_models.AgentPool"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AgentPool"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._upgrade_node_image_version_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _upgrade_node_image_version_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore + + async def begin_upgrade_node_image_version( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.AgentPool"]: + """Upgrade node image version of an agent pool to the latest. + + Upgrade node image version of an agent pool to the latest. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._upgrade_node_image_version_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_maintenance_configurations_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_maintenance_configurations_operations.py new file mode 100755 index 00000000000..b10621f7b93 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_maintenance_configurations_operations.py @@ -0,0 +1,317 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MaintenanceConfigurationsOperations: + """MaintenanceConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_managed_cluster( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.MaintenanceConfigurationListResult"]: + """Gets a list of maintenance configurations in the specified managed cluster. + + Gets a list of maintenance configurations in the specified managed cluster. The operation + returns properties of each maintenance configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MaintenanceConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_managed_cluster.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('MaintenanceConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_managed_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + **kwargs: Any + ) -> "_models.MaintenanceConfiguration": + """Gets the maintenance configuration. + + Gets the details of maintenance configurations by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'configName': self._serialize.url("config_name", config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: "_models.MaintenanceConfiguration", + **kwargs: Any + ) -> "_models.MaintenanceConfiguration": + """Creates or updates a maintenance configurations. + + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :param parameters: Parameters supplied to the Create or Update a default maintenance + configuration. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'configName': self._serialize.url("config_name", config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'MaintenanceConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + **kwargs: Any + ) -> None: + """Deletes a maintenance configuration. + + Deletes the maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'configName': self._serialize.url("config_name", config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_managed_clusters_operations.py new file mode 100755 index 00000000000..4fc5b8a6549 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_managed_clusters_operations.py @@ -0,0 +1,1844 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ManagedClustersOperations: + """ManagedClustersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get_os_options( + self, + location: str, + resource_type: Optional[str] = None, + **kwargs: Any + ) -> "_models.OSOptionProfile": + """Gets supported OS options in the specified subscription. + + Gets supported OS options in the specified subscription. + + :param location: The name of a supported Azure region. + :type location: str + :param resource_type: resource type for which the OS options needs to be returned. + :type resource_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OSOptionProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.OSOptionProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OSOptionProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_os_options.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if resource_type is not None: + query_parameters['resource-type'] = self._serialize.query("resource_type", resource_type, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OSOptionProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_os_options.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default'} # type: ignore + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ManagedClusterListResult"]: + """Gets a list of managed clusters in the specified subscription. + + Gets a list of managed clusters in the specified subscription. The operation returns properties + of each managed cluster. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ManagedClusterListResult"]: + """Lists managed clusters in the specified subscription and resource group. + + Lists managed clusters in the specified subscription and resource group. The operation returns + properties of each managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + async def get_upgrade_profile( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.ManagedClusterUpgradeProfile": + """Gets upgrade profile for a managed cluster. + + Gets the details of the upgrade profile for a managed cluster with a specified resource group + and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_upgrade_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterUpgradeProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} # type: ignore + + async def get_access_profile( + self, + resource_group_name: str, + resource_name: str, + role_name: str, + **kwargs: Any + ) -> "_models.ManagedClusterAccessProfile": + """Gets an access profile of a managed cluster. + + Gets the accessProfile for the specified role name of the managed cluster with a specified + resource group and name. **WARNING**\ : This API will be deprecated. Instead use + `ListClusterUserCredentials + `_ or + `ListClusterAdminCredentials + `_ . + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param role_name: The name of the role for managed cluster accessProfile resource. + :type role_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAccessProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterAccessProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_access_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterAccessProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} # type: ignore + + async def list_cluster_admin_credentials( + self, + resource_group_name: str, + resource_name: str, + server_fqdn: Optional[str] = None, + **kwargs: Any + ) -> "_models.CredentialResults": + """Gets cluster admin credential of a managed cluster. + + Gets cluster admin credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. + :type server_fqdn: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_admin_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if server_fqdn is not None: + query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} # type: ignore + + async def list_cluster_user_credentials( + self, + resource_group_name: str, + resource_name: str, + server_fqdn: Optional[str] = None, + **kwargs: Any + ) -> "_models.CredentialResults": + """Gets cluster user credential of a managed cluster. + + Gets cluster user credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. + :type server_fqdn: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if server_fqdn is not None: + query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} # type: ignore + + async def list_cluster_monitoring_user_credentials( + self, + resource_group_name: str, + resource_name: str, + server_fqdn: Optional[str] = None, + **kwargs: Any + ) -> "_models.CredentialResults": + """Gets cluster monitoring user credential of a managed cluster. + + Gets cluster monitoring user credential of the managed cluster with a specified resource group + and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. + :type server_fqdn: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_monitoring_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if server_fqdn is not None: + query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.ManagedCluster": + """Gets a managed cluster. + + Gets the details of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedCluster, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedCluster", + **kwargs: Any + ) -> "_models.ManagedCluster": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedCluster') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedCluster", + **kwargs: Any + ) -> AsyncLROPoller["_models.ManagedCluster"]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster with the specified configuration for agents and Kubernetes + version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _update_tags_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ManagedCluster": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_tags_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> AsyncLROPoller["_models.ManagedCluster"]: + """Updates tags on a managed cluster. + + Updates a managed cluster with the specified tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a managed cluster. + + Deletes the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _reset_service_principal_profile_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterServicePrincipalProfile", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_service_principal_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_service_principal_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + async def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterServicePrincipalProfile", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset Service Principal Profile of a managed cluster. + + Update the service principal Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a + Managed Cluster. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterServicePrincipalProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_service_principal_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + async def _reset_aad_profile_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterAADProfile", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_aad_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_aad_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + async def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterAADProfile", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reset AAD Profile of a managed cluster. + + Update the AAD Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed + Cluster. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_aad_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + async def _rotate_cluster_certificates_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._rotate_cluster_certificates_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _rotate_cluster_certificates_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore + + async def begin_rotate_cluster_certificates( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Rotate certificates of a managed cluster. + + Rotate certificates of a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._rotate_cluster_certificates_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore + + async def _stop_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._stop_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore + + async def begin_stop( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Stop Managed Cluster. + + Stops a Running Managed Cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._stop_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore + + async def _start_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._start_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore + + async def begin_start( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Start Managed Cluster. + + Starts a Stopped Managed Cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore + + async def _run_command_initial( + self, + resource_group_name: str, + resource_name: str, + request_payload: "_models.RunCommandRequest", + **kwargs: Any + ) -> Optional["_models.RunCommandResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.RunCommandResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._run_command_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request_payload, 'RunCommandRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RunCommandResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _run_command_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'} # type: ignore + + async def begin_run_command( + self, + resource_group_name: str, + resource_name: str, + request_payload: "_models.RunCommandRequest", + **kwargs: Any + ) -> AsyncLROPoller["_models.RunCommandResult"]: + """Run Command against Managed Kubernetes Service. + + Submit a command to run against managed kubernetes service, it will create a pod to run the + command. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param request_payload: Parameters supplied to the RunCommand operation. + :type request_payload: ~azure.mgmt.containerservice.v2021_05_01.models.RunCommandRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RunCommandResult or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2021_05_01.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RunCommandResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._run_command_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + request_payload=request_payload, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('RunCommandResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'} # type: ignore + + async def get_command_result( + self, + resource_group_name: str, + resource_name: str, + command_id: str, + **kwargs: Any + ) -> Optional["_models.RunCommandResult"]: + """Get command result. + + Get command result from previous runCommand invoke. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param command_id: Id of the command request. + :type command_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RunCommandResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.RunCommandResult or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.RunCommandResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_command_result.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'commandId': self._serialize.url("command_id", command_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RunCommandResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_command_result.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}'} # type: ignore + + def list_outbound_network_dependencies_endpoints( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.OutboundEnvironmentEndpointCollection"]: + """Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. + + Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the + specified managed cluster. The operation returns properties of each egress endpoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OutboundEnvironmentEndpointCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.OutboundEnvironmentEndpointCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_outbound_network_dependencies_endpoints.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OutboundEnvironmentEndpointCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_operations.py new file mode 100755 index 00000000000..5bb49c542c2 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.OperationListResult"]: + """Gets a list of compute operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_private_endpoint_connections_operations.py new file mode 100755 index 00000000000..5881a84458d --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,357 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations: + """PrivateEndpointConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnectionListResult": + """Gets a list of private endpoint connections in the specified managed cluster. + + Gets a list of private endpoint connections in the specified managed cluster. The operation + returns properties of each private endpoint connection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnectionListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Gets the private endpoint connection. + + Gets the details of the private endpoint connection by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Updates a private endpoint connection. + + Updates a private endpoint connection in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param parameters: Parameters supplied to the Update a private endpoint connection operation. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a private endpoint connection. + + Deletes the private endpoint connection in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_private_link_resources_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_private_link_resources_operations.py new file mode 100755 index 00000000000..dd9f79796f6 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_private_link_resources_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations: + """PrivateLinkResourcesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.PrivateLinkResourcesListResult": + """Gets a list of private link resources in the specified managed cluster. + + Gets a list of private link resources in the specified managed cluster. The operation returns + properties of each private link resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResourcesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourcesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_resolve_private_link_service_id_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_resolve_private_link_service_id_operations.py new file mode 100755 index 00000000000..930df4ecfc5 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ResolvePrivateLinkServiceIdOperations: + """ResolvePrivateLinkServiceIdOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def post( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.PrivateLinkResource", + **kwargs: Any + ) -> "_models.PrivateLinkResource": + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters (name, groupId) supplied in order to resolve a private link + service ID. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.post.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateLinkResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/__init__.py old mode 100644 new mode 100755 index f8893541ba3..5ef1b816ad0 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/__init__.py @@ -1,21 +1,24 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- try: from ._models_py3 import AgentPool from ._models_py3 import AgentPoolAvailableVersions from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem + from ._models_py3 import AgentPoolListResult from ._models_py3 import AgentPoolUpgradeProfile from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem from ._models_py3 import AgentPoolUpgradeSettings + from ._models_py3 import CloudError + from ._models_py3 import CloudErrorBody + from ._models_py3 import Components1Q1Og48SchemasManagedclusterAllof1 + from ._models_py3 import Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties + from ._models_py3 import ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties from ._models_py3 import ContainerServiceDiagnosticsProfile from ._models_py3 import ContainerServiceLinuxProfile from ._models_py3 import ContainerServiceMasterProfile @@ -31,18 +34,19 @@ from ._models_py3 import KubeletConfig from ._models_py3 import LinuxOSConfig from ._models_py3 import MaintenanceConfiguration + from ._models_py3 import MaintenanceConfigurationListResult from ._models_py3 import ManagedCluster from ._models_py3 import ManagedClusterAADProfile + from ._models_py3 import ManagedClusterAPIServerAccessProfile from ._models_py3 import ManagedClusterAccessProfile from ._models_py3 import ManagedClusterAddonProfile from ._models_py3 import ManagedClusterAddonProfileIdentity from ._models_py3 import ManagedClusterAgentPoolProfile from ._models_py3 import ManagedClusterAgentPoolProfileProperties - from ._models_py3 import ManagedClusterAPIServerAccessProfile from ._models_py3 import ManagedClusterAutoUpgradeProfile from ._models_py3 import ManagedClusterHTTPProxyConfig from ._models_py3 import ManagedClusterIdentity - from ._models_py3 import ManagedClusterIdentityUserAssignedIdentitiesValue + from ._models_py3 import ManagedClusterListResult from ._models_py3 import ManagedClusterLoadBalancerProfile from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes @@ -54,15 +58,16 @@ from ._models_py3 import ManagedClusterPoolUpgradeProfile from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile - from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue - from ._models_py3 import ManagedClusterServicePrincipalProfile from ._models_py3 import ManagedClusterSKU + from ._models_py3 import ManagedClusterServicePrincipalProfile from ._models_py3 import ManagedClusterUpgradeProfile from ._models_py3 import ManagedClusterWindowsProfile - from ._models_py3 import OperationValue from ._models_py3 import OSOptionProfile from ._models_py3 import OSOptionProperty + from ._models_py3 import OperationListResult + from ._models_py3 import OperationValue from ._models_py3 import OutboundEnvironmentEndpoint + from ._models_py3 import OutboundEnvironmentEndpointCollection from ._models_py3 import PowerState from ._models_py3 import PrivateEndpoint from ._models_py3 import PrivateEndpointConnection @@ -82,121 +87,132 @@ from ._models_py3 import TimeSpan from ._models_py3 import UserAssignedIdentity except (SyntaxError, ImportError): - from ._models import AgentPool - from ._models import AgentPoolAvailableVersions - from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem - from ._models import AgentPoolUpgradeProfile - from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem - from ._models import AgentPoolUpgradeSettings - from ._models import ContainerServiceDiagnosticsProfile - from ._models import ContainerServiceLinuxProfile - from ._models import ContainerServiceMasterProfile - from ._models import ContainerServiceNetworkProfile - from ._models import ContainerServiceSshConfiguration - from ._models import ContainerServiceSshPublicKey - from ._models import ContainerServiceVMDiagnostics - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import EndpointDependency - from ._models import EndpointDetail - from ._models import ExtendedLocation - from ._models import KubeletConfig - from ._models import LinuxOSConfig - from ._models import MaintenanceConfiguration - from ._models import ManagedCluster - from ._models import ManagedClusterAADProfile - from ._models import ManagedClusterAccessProfile - from ._models import ManagedClusterAddonProfile - from ._models import ManagedClusterAddonProfileIdentity - from ._models import ManagedClusterAgentPoolProfile - from ._models import ManagedClusterAgentPoolProfileProperties - from ._models import ManagedClusterAPIServerAccessProfile - from ._models import ManagedClusterAutoUpgradeProfile - from ._models import ManagedClusterHTTPProxyConfig - from ._models import ManagedClusterIdentity - from ._models import ManagedClusterIdentityUserAssignedIdentitiesValue - from ._models import ManagedClusterLoadBalancerProfile - from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs - from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes - from ._models import ManagedClusterLoadBalancerProfileOutboundIPs - from ._models import ManagedClusterPodIdentity - from ._models import ManagedClusterPodIdentityException - from ._models import ManagedClusterPodIdentityProfile - from ._models import ManagedClusterPodIdentityProvisioningInfo - from ._models import ManagedClusterPoolUpgradeProfile - from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem - from ._models import ManagedClusterPropertiesAutoScalerProfile - from ._models import ManagedClusterPropertiesIdentityProfileValue - from ._models import ManagedClusterServicePrincipalProfile - from ._models import ManagedClusterSKU - from ._models import ManagedClusterUpgradeProfile - from ._models import ManagedClusterWindowsProfile - from ._models import OperationValue - from ._models import OSOptionProfile - from ._models import OSOptionProperty - from ._models import OutboundEnvironmentEndpoint - from ._models import PowerState - from ._models import PrivateEndpoint - from ._models import PrivateEndpointConnection - from ._models import PrivateEndpointConnectionListResult - from ._models import PrivateLinkResource - from ._models import PrivateLinkResourcesListResult - from ._models import PrivateLinkServiceConnectionState - from ._models import Resource - from ._models import ResourceReference - from ._models import RunCommandRequest - from ._models import RunCommandResult - from ._models import SubResource - from ._models import SysctlConfig - from ._models import SystemData - from ._models import TagsObject - from ._models import TimeInWeek - from ._models import TimeSpan - from ._models import UserAssignedIdentity -from ._paged_models import AgentPoolPaged -from ._paged_models import MaintenanceConfigurationPaged -from ._paged_models import ManagedClusterPaged -from ._paged_models import OperationValuePaged -from ._paged_models import OutboundEnvironmentEndpointPaged + from ._models import AgentPool # type: ignore + from ._models import AgentPoolAvailableVersions # type: ignore + from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem # type: ignore + from ._models import AgentPoolListResult # type: ignore + from ._models import AgentPoolUpgradeProfile # type: ignore + from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem # type: ignore + from ._models import AgentPoolUpgradeSettings # type: ignore + from ._models import CloudError # type: ignore + from ._models import CloudErrorBody # type: ignore + from ._models import Components1Q1Og48SchemasManagedclusterAllof1 # type: ignore + from ._models import Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties # type: ignore + from ._models import ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties # type: ignore + from ._models import ContainerServiceDiagnosticsProfile # type: ignore + from ._models import ContainerServiceLinuxProfile # type: ignore + from ._models import ContainerServiceMasterProfile # type: ignore + from ._models import ContainerServiceNetworkProfile # type: ignore + from ._models import ContainerServiceSshConfiguration # type: ignore + from ._models import ContainerServiceSshPublicKey # type: ignore + from ._models import ContainerServiceVMDiagnostics # type: ignore + from ._models import CredentialResult # type: ignore + from ._models import CredentialResults # type: ignore + from ._models import EndpointDependency # type: ignore + from ._models import EndpointDetail # type: ignore + from ._models import ExtendedLocation # type: ignore + from ._models import KubeletConfig # type: ignore + from ._models import LinuxOSConfig # type: ignore + from ._models import MaintenanceConfiguration # type: ignore + from ._models import MaintenanceConfigurationListResult # type: ignore + from ._models import ManagedCluster # type: ignore + from ._models import ManagedClusterAADProfile # type: ignore + from ._models import ManagedClusterAPIServerAccessProfile # type: ignore + from ._models import ManagedClusterAccessProfile # type: ignore + from ._models import ManagedClusterAddonProfile # type: ignore + from ._models import ManagedClusterAddonProfileIdentity # type: ignore + from ._models import ManagedClusterAgentPoolProfile # type: ignore + from ._models import ManagedClusterAgentPoolProfileProperties # type: ignore + from ._models import ManagedClusterAutoUpgradeProfile # type: ignore + from ._models import ManagedClusterHTTPProxyConfig # type: ignore + from ._models import ManagedClusterIdentity # type: ignore + from ._models import ManagedClusterListResult # type: ignore + from ._models import ManagedClusterLoadBalancerProfile # type: ignore + from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs # type: ignore + from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes # type: ignore + from ._models import ManagedClusterLoadBalancerProfileOutboundIPs # type: ignore + from ._models import ManagedClusterPodIdentity # type: ignore + from ._models import ManagedClusterPodIdentityException # type: ignore + from ._models import ManagedClusterPodIdentityProfile # type: ignore + from ._models import ManagedClusterPodIdentityProvisioningInfo # type: ignore + from ._models import ManagedClusterPoolUpgradeProfile # type: ignore + from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem # type: ignore + from ._models import ManagedClusterPropertiesAutoScalerProfile # type: ignore + from ._models import ManagedClusterSKU # type: ignore + from ._models import ManagedClusterServicePrincipalProfile # type: ignore + from ._models import ManagedClusterUpgradeProfile # type: ignore + from ._models import ManagedClusterWindowsProfile # type: ignore + from ._models import OSOptionProfile # type: ignore + from ._models import OSOptionProperty # type: ignore + from ._models import OperationListResult # type: ignore + from ._models import OperationValue # type: ignore + from ._models import OutboundEnvironmentEndpoint # type: ignore + from ._models import OutboundEnvironmentEndpointCollection # type: ignore + from ._models import PowerState # type: ignore + from ._models import PrivateEndpoint # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateLinkResource # type: ignore + from ._models import PrivateLinkResourcesListResult # type: ignore + from ._models import PrivateLinkServiceConnectionState # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceReference # type: ignore + from ._models import RunCommandRequest # type: ignore + from ._models import RunCommandResult # type: ignore + from ._models import SubResource # type: ignore + from ._models import SysctlConfig # type: ignore + from ._models import SystemData # type: ignore + from ._models import TagsObject # type: ignore + from ._models import TimeInWeek # type: ignore + from ._models import TimeSpan # type: ignore + from ._models import UserAssignedIdentity # type: ignore + from ._container_service_client_enums import ( - ContainerServiceStorageProfileTypes, - ContainerServiceVMSizeTypes, - OSDiskType, - KubeletDiskType, - OSType, - OSSKU, - AgentPoolType, AgentPoolMode, + AgentPoolType, Code, - ScaleSetPriority, - ScaleSetEvictionPolicy, + ConnectionStatus, + ContainerServiceStorageProfileTypes, + ContainerServiceVMSizeTypes, + Count, + CreatedByType, + Expander, + ExtendedLocationTypes, GPUInstanceProfile, + KubeletDiskType, LicenseType, - NetworkPlugin, - NetworkPolicy, - NetworkMode, - OutboundType, LoadBalancerSku, - CreatedByType, - WeekDay, ManagedClusterPodIdentityProvisioningState, - UpgradeChannel, - Expander, - ResourceIdentityType, ManagedClusterSKUName, ManagedClusterSKUTier, - ExtendedLocationTypes, + NetworkMode, + NetworkPlugin, + NetworkPolicy, + OSDiskType, + OSSKU, + OSType, + OutboundType, PrivateEndpointConnectionProvisioningState, - ConnectionStatus, + ResourceIdentityType, + ScaleSetEvictionPolicy, + ScaleSetPriority, + UpgradeChannel, + WeekDay, ) __all__ = [ 'AgentPool', 'AgentPoolAvailableVersions', 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', + 'AgentPoolListResult', 'AgentPoolUpgradeProfile', 'AgentPoolUpgradeProfilePropertiesUpgradesItem', 'AgentPoolUpgradeSettings', + 'CloudError', + 'CloudErrorBody', + 'Components1Q1Og48SchemasManagedclusterAllof1', + 'Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties', + 'ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties', 'ContainerServiceDiagnosticsProfile', 'ContainerServiceLinuxProfile', 'ContainerServiceMasterProfile', @@ -212,18 +228,19 @@ 'KubeletConfig', 'LinuxOSConfig', 'MaintenanceConfiguration', + 'MaintenanceConfigurationListResult', 'ManagedCluster', 'ManagedClusterAADProfile', + 'ManagedClusterAPIServerAccessProfile', 'ManagedClusterAccessProfile', 'ManagedClusterAddonProfile', 'ManagedClusterAddonProfileIdentity', 'ManagedClusterAgentPoolProfile', 'ManagedClusterAgentPoolProfileProperties', - 'ManagedClusterAPIServerAccessProfile', 'ManagedClusterAutoUpgradeProfile', 'ManagedClusterHTTPProxyConfig', 'ManagedClusterIdentity', - 'ManagedClusterIdentityUserAssignedIdentitiesValue', + 'ManagedClusterListResult', 'ManagedClusterLoadBalancerProfile', 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', @@ -235,15 +252,16 @@ 'ManagedClusterPoolUpgradeProfile', 'ManagedClusterPoolUpgradeProfileUpgradesItem', 'ManagedClusterPropertiesAutoScalerProfile', - 'ManagedClusterPropertiesIdentityProfileValue', - 'ManagedClusterServicePrincipalProfile', 'ManagedClusterSKU', + 'ManagedClusterServicePrincipalProfile', 'ManagedClusterUpgradeProfile', 'ManagedClusterWindowsProfile', - 'OperationValue', 'OSOptionProfile', 'OSOptionProperty', + 'OperationListResult', + 'OperationValue', 'OutboundEnvironmentEndpoint', + 'OutboundEnvironmentEndpointCollection', 'PowerState', 'PrivateEndpoint', 'PrivateEndpointConnection', @@ -262,38 +280,34 @@ 'TimeInWeek', 'TimeSpan', 'UserAssignedIdentity', - 'OperationValuePaged', - 'ManagedClusterPaged', - 'OutboundEnvironmentEndpointPaged', - 'MaintenanceConfigurationPaged', - 'AgentPoolPaged', - 'ContainerServiceStorageProfileTypes', - 'ContainerServiceVMSizeTypes', - 'OSDiskType', - 'KubeletDiskType', - 'OSType', - 'OSSKU', - 'AgentPoolType', 'AgentPoolMode', + 'AgentPoolType', 'Code', - 'ScaleSetPriority', - 'ScaleSetEvictionPolicy', + 'ConnectionStatus', + 'ContainerServiceStorageProfileTypes', + 'ContainerServiceVMSizeTypes', + 'Count', + 'CreatedByType', + 'Expander', + 'ExtendedLocationTypes', 'GPUInstanceProfile', + 'KubeletDiskType', 'LicenseType', - 'NetworkPlugin', - 'NetworkPolicy', - 'NetworkMode', - 'OutboundType', 'LoadBalancerSku', - 'CreatedByType', - 'WeekDay', 'ManagedClusterPodIdentityProvisioningState', - 'UpgradeChannel', - 'Expander', - 'ResourceIdentityType', 'ManagedClusterSKUName', 'ManagedClusterSKUTier', - 'ExtendedLocationTypes', + 'NetworkMode', + 'NetworkPlugin', + 'NetworkPolicy', + 'OSDiskType', + 'OSSKU', + 'OSType', + 'OutboundType', 'PrivateEndpointConnectionProvisioningState', - 'ConnectionStatus', + 'ResourceIdentityType', + 'ScaleSetEvictionPolicy', + 'ScaleSetPriority', + 'UpgradeChannel', + 'WeekDay', ] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_container_service_client_enums.py old mode 100644 new mode 100755 index 07d226f1f08..bdf1668dad1 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_container_service_client_enums.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_container_service_client_enums.py @@ -1,378 +1,438 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum - - -class ContainerServiceStorageProfileTypes(str, Enum): - - storage_account = "StorageAccount" - managed_disks = "ManagedDisks" - - -class ContainerServiceVMSizeTypes(str, Enum): - - standard_a1 = "Standard_A1" - standard_a10 = "Standard_A10" - standard_a11 = "Standard_A11" - standard_a1_v2 = "Standard_A1_v2" - standard_a2 = "Standard_A2" - standard_a2_v2 = "Standard_A2_v2" - standard_a2m_v2 = "Standard_A2m_v2" - standard_a3 = "Standard_A3" - standard_a4 = "Standard_A4" - standard_a4_v2 = "Standard_A4_v2" - standard_a4m_v2 = "Standard_A4m_v2" - standard_a5 = "Standard_A5" - standard_a6 = "Standard_A6" - standard_a7 = "Standard_A7" - standard_a8 = "Standard_A8" - standard_a8_v2 = "Standard_A8_v2" - standard_a8m_v2 = "Standard_A8m_v2" - standard_a9 = "Standard_A9" - standard_b2ms = "Standard_B2ms" - standard_b2s = "Standard_B2s" - standard_b4ms = "Standard_B4ms" - standard_b8ms = "Standard_B8ms" - standard_d1 = "Standard_D1" - standard_d11 = "Standard_D11" - standard_d11_v2 = "Standard_D11_v2" - standard_d11_v2_promo = "Standard_D11_v2_Promo" - standard_d12 = "Standard_D12" - standard_d12_v2 = "Standard_D12_v2" - standard_d12_v2_promo = "Standard_D12_v2_Promo" - standard_d13 = "Standard_D13" - standard_d13_v2 = "Standard_D13_v2" - standard_d13_v2_promo = "Standard_D13_v2_Promo" - standard_d14 = "Standard_D14" - standard_d14_v2 = "Standard_D14_v2" - standard_d14_v2_promo = "Standard_D14_v2_Promo" - standard_d15_v2 = "Standard_D15_v2" - standard_d16_v3 = "Standard_D16_v3" - standard_d16s_v3 = "Standard_D16s_v3" - standard_d1_v2 = "Standard_D1_v2" - standard_d2 = "Standard_D2" - standard_d2_v2 = "Standard_D2_v2" - standard_d2_v2_promo = "Standard_D2_v2_Promo" - standard_d2_v3 = "Standard_D2_v3" - standard_d2s_v3 = "Standard_D2s_v3" - standard_d3 = "Standard_D3" - standard_d32_v3 = "Standard_D32_v3" - standard_d32s_v3 = "Standard_D32s_v3" - standard_d3_v2 = "Standard_D3_v2" - standard_d3_v2_promo = "Standard_D3_v2_Promo" - standard_d4 = "Standard_D4" - standard_d4_v2 = "Standard_D4_v2" - standard_d4_v2_promo = "Standard_D4_v2_Promo" - standard_d4_v3 = "Standard_D4_v3" - standard_d4s_v3 = "Standard_D4s_v3" - standard_d5_v2 = "Standard_D5_v2" - standard_d5_v2_promo = "Standard_D5_v2_Promo" - standard_d64_v3 = "Standard_D64_v3" - standard_d64s_v3 = "Standard_D64s_v3" - standard_d8_v3 = "Standard_D8_v3" - standard_d8s_v3 = "Standard_D8s_v3" - standard_ds1 = "Standard_DS1" - standard_ds11 = "Standard_DS11" - standard_ds11_v2 = "Standard_DS11_v2" - standard_ds11_v2_promo = "Standard_DS11_v2_Promo" - standard_ds12 = "Standard_DS12" - standard_ds12_v2 = "Standard_DS12_v2" - standard_ds12_v2_promo = "Standard_DS12_v2_Promo" - standard_ds13 = "Standard_DS13" - standard_ds13_2_v2 = "Standard_DS13-2_v2" - standard_ds13_4_v2 = "Standard_DS13-4_v2" - standard_ds13_v2 = "Standard_DS13_v2" - standard_ds13_v2_promo = "Standard_DS13_v2_Promo" - standard_ds14 = "Standard_DS14" - standard_ds14_4_v2 = "Standard_DS14-4_v2" - standard_ds14_8_v2 = "Standard_DS14-8_v2" - standard_ds14_v2 = "Standard_DS14_v2" - standard_ds14_v2_promo = "Standard_DS14_v2_Promo" - standard_ds15_v2 = "Standard_DS15_v2" - standard_ds1_v2 = "Standard_DS1_v2" - standard_ds2 = "Standard_DS2" - standard_ds2_v2 = "Standard_DS2_v2" - standard_ds2_v2_promo = "Standard_DS2_v2_Promo" - standard_ds3 = "Standard_DS3" - standard_ds3_v2 = "Standard_DS3_v2" - standard_ds3_v2_promo = "Standard_DS3_v2_Promo" - standard_ds4 = "Standard_DS4" - standard_ds4_v2 = "Standard_DS4_v2" - standard_ds4_v2_promo = "Standard_DS4_v2_Promo" - standard_ds5_v2 = "Standard_DS5_v2" - standard_ds5_v2_promo = "Standard_DS5_v2_Promo" - standard_e16_v3 = "Standard_E16_v3" - standard_e16s_v3 = "Standard_E16s_v3" - standard_e2_v3 = "Standard_E2_v3" - standard_e2s_v3 = "Standard_E2s_v3" - standard_e32_16s_v3 = "Standard_E32-16s_v3" - standard_e32_8s_v3 = "Standard_E32-8s_v3" - standard_e32_v3 = "Standard_E32_v3" - standard_e32s_v3 = "Standard_E32s_v3" - standard_e4_v3 = "Standard_E4_v3" - standard_e4s_v3 = "Standard_E4s_v3" - standard_e64_16s_v3 = "Standard_E64-16s_v3" - standard_e64_32s_v3 = "Standard_E64-32s_v3" - standard_e64_v3 = "Standard_E64_v3" - standard_e64s_v3 = "Standard_E64s_v3" - standard_e8_v3 = "Standard_E8_v3" - standard_e8s_v3 = "Standard_E8s_v3" - standard_f1 = "Standard_F1" - standard_f16 = "Standard_F16" - standard_f16s = "Standard_F16s" - standard_f16s_v2 = "Standard_F16s_v2" - standard_f1s = "Standard_F1s" - standard_f2 = "Standard_F2" - standard_f2s = "Standard_F2s" - standard_f2s_v2 = "Standard_F2s_v2" - standard_f32s_v2 = "Standard_F32s_v2" - standard_f4 = "Standard_F4" - standard_f4s = "Standard_F4s" - standard_f4s_v2 = "Standard_F4s_v2" - standard_f64s_v2 = "Standard_F64s_v2" - standard_f72s_v2 = "Standard_F72s_v2" - standard_f8 = "Standard_F8" - standard_f8s = "Standard_F8s" - standard_f8s_v2 = "Standard_F8s_v2" - standard_g1 = "Standard_G1" - standard_g2 = "Standard_G2" - standard_g3 = "Standard_G3" - standard_g4 = "Standard_G4" - standard_g5 = "Standard_G5" - standard_gs1 = "Standard_GS1" - standard_gs2 = "Standard_GS2" - standard_gs3 = "Standard_GS3" - standard_gs4 = "Standard_GS4" - standard_gs4_4 = "Standard_GS4-4" - standard_gs4_8 = "Standard_GS4-8" - standard_gs5 = "Standard_GS5" - standard_gs5_16 = "Standard_GS5-16" - standard_gs5_8 = "Standard_GS5-8" - standard_h16 = "Standard_H16" - standard_h16m = "Standard_H16m" - standard_h16mr = "Standard_H16mr" - standard_h16r = "Standard_H16r" - standard_h8 = "Standard_H8" - standard_h8m = "Standard_H8m" - standard_l16s = "Standard_L16s" - standard_l32s = "Standard_L32s" - standard_l4s = "Standard_L4s" - standard_l8s = "Standard_L8s" - standard_m128_32ms = "Standard_M128-32ms" - standard_m128_64ms = "Standard_M128-64ms" - standard_m128ms = "Standard_M128ms" - standard_m128s = "Standard_M128s" - standard_m64_16ms = "Standard_M64-16ms" - standard_m64_32ms = "Standard_M64-32ms" - standard_m64ms = "Standard_M64ms" - standard_m64s = "Standard_M64s" - standard_nc12 = "Standard_NC12" - standard_nc12s_v2 = "Standard_NC12s_v2" - standard_nc12s_v3 = "Standard_NC12s_v3" - standard_nc24 = "Standard_NC24" - standard_nc24r = "Standard_NC24r" - standard_nc24rs_v2 = "Standard_NC24rs_v2" - standard_nc24rs_v3 = "Standard_NC24rs_v3" - standard_nc24s_v2 = "Standard_NC24s_v2" - standard_nc24s_v3 = "Standard_NC24s_v3" - standard_nc6 = "Standard_NC6" - standard_nc6s_v2 = "Standard_NC6s_v2" - standard_nc6s_v3 = "Standard_NC6s_v3" - standard_nd12s = "Standard_ND12s" - standard_nd24rs = "Standard_ND24rs" - standard_nd24s = "Standard_ND24s" - standard_nd6s = "Standard_ND6s" - standard_nv12 = "Standard_NV12" - standard_nv24 = "Standard_NV24" - standard_nv6 = "Standard_NV6" +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AgentPoolMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """AgentPoolMode represents mode of an agent pool. + """ + + SYSTEM = "System" + USER = "User" + +class AgentPoolType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """AgentPoolType represents types of an agent pool. + """ + + VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" + AVAILABILITY_SET = "AvailabilitySet" + +class Code(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tells whether the cluster is Running or Stopped + """ + + RUNNING = "Running" + STOPPED = "Stopped" + +class ConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The private link service connection status. + """ + + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + DISCONNECTED = "Disconnected" + +class ContainerServiceStorageProfileTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Storage profile specifies what kind of storage used. Choose from StorageAccount and + ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. + """ + + STORAGE_ACCOUNT = "StorageAccount" + MANAGED_DISKS = "ManagedDisks" + +class ContainerServiceVMSizeTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Size of agent VMs. + """ + + STANDARD_A1 = "Standard_A1" + STANDARD_A10 = "Standard_A10" + STANDARD_A11 = "Standard_A11" + STANDARD_A1_V2 = "Standard_A1_v2" + STANDARD_A2 = "Standard_A2" + STANDARD_A2_V2 = "Standard_A2_v2" + STANDARD_A2_M_V2 = "Standard_A2m_v2" + STANDARD_A3 = "Standard_A3" + STANDARD_A4 = "Standard_A4" + STANDARD_A4_V2 = "Standard_A4_v2" + STANDARD_A4_M_V2 = "Standard_A4m_v2" + STANDARD_A5 = "Standard_A5" + STANDARD_A6 = "Standard_A6" + STANDARD_A7 = "Standard_A7" + STANDARD_A8 = "Standard_A8" + STANDARD_A8_V2 = "Standard_A8_v2" + STANDARD_A8_M_V2 = "Standard_A8m_v2" + STANDARD_A9 = "Standard_A9" + STANDARD_B2_MS = "Standard_B2ms" + STANDARD_B2_S = "Standard_B2s" + STANDARD_B4_MS = "Standard_B4ms" + STANDARD_B8_MS = "Standard_B8ms" + STANDARD_D1 = "Standard_D1" + STANDARD_D11 = "Standard_D11" + STANDARD_D11_V2 = "Standard_D11_v2" + STANDARD_D11_V2_PROMO = "Standard_D11_v2_Promo" + STANDARD_D12 = "Standard_D12" + STANDARD_D12_V2 = "Standard_D12_v2" + STANDARD_D12_V2_PROMO = "Standard_D12_v2_Promo" + STANDARD_D13 = "Standard_D13" + STANDARD_D13_V2 = "Standard_D13_v2" + STANDARD_D13_V2_PROMO = "Standard_D13_v2_Promo" + STANDARD_D14 = "Standard_D14" + STANDARD_D14_V2 = "Standard_D14_v2" + STANDARD_D14_V2_PROMO = "Standard_D14_v2_Promo" + STANDARD_D15_V2 = "Standard_D15_v2" + STANDARD_D16_V3 = "Standard_D16_v3" + STANDARD_D16_S_V3 = "Standard_D16s_v3" + STANDARD_D1_V2 = "Standard_D1_v2" + STANDARD_D2 = "Standard_D2" + STANDARD_D2_V2 = "Standard_D2_v2" + STANDARD_D2_V2_PROMO = "Standard_D2_v2_Promo" + STANDARD_D2_V3 = "Standard_D2_v3" + STANDARD_D2_S_V3 = "Standard_D2s_v3" + STANDARD_D3 = "Standard_D3" + STANDARD_D32_V3 = "Standard_D32_v3" + STANDARD_D32_S_V3 = "Standard_D32s_v3" + STANDARD_D3_V2 = "Standard_D3_v2" + STANDARD_D3_V2_PROMO = "Standard_D3_v2_Promo" + STANDARD_D4 = "Standard_D4" + STANDARD_D4_V2 = "Standard_D4_v2" + STANDARD_D4_V2_PROMO = "Standard_D4_v2_Promo" + STANDARD_D4_V3 = "Standard_D4_v3" + STANDARD_D4_S_V3 = "Standard_D4s_v3" + STANDARD_D5_V2 = "Standard_D5_v2" + STANDARD_D5_V2_PROMO = "Standard_D5_v2_Promo" + STANDARD_D64_V3 = "Standard_D64_v3" + STANDARD_D64_S_V3 = "Standard_D64s_v3" + STANDARD_D8_V3 = "Standard_D8_v3" + STANDARD_D8_S_V3 = "Standard_D8s_v3" + STANDARD_DS1 = "Standard_DS1" + STANDARD_DS11 = "Standard_DS11" + STANDARD_DS11_V2 = "Standard_DS11_v2" + STANDARD_DS11_V2_PROMO = "Standard_DS11_v2_Promo" + STANDARD_DS12 = "Standard_DS12" + STANDARD_DS12_V2 = "Standard_DS12_v2" + STANDARD_DS12_V2_PROMO = "Standard_DS12_v2_Promo" + STANDARD_DS13 = "Standard_DS13" + STANDARD_DS13_2_V2 = "Standard_DS13-2_v2" + STANDARD_DS13_4_V2 = "Standard_DS13-4_v2" + STANDARD_DS13_V2 = "Standard_DS13_v2" + STANDARD_DS13_V2_PROMO = "Standard_DS13_v2_Promo" + STANDARD_DS14 = "Standard_DS14" + STANDARD_DS14_4_V2 = "Standard_DS14-4_v2" + STANDARD_DS14_8_V2 = "Standard_DS14-8_v2" + STANDARD_DS14_V2 = "Standard_DS14_v2" + STANDARD_DS14_V2_PROMO = "Standard_DS14_v2_Promo" + STANDARD_DS15_V2 = "Standard_DS15_v2" + STANDARD_DS1_V2 = "Standard_DS1_v2" + STANDARD_DS2 = "Standard_DS2" + STANDARD_DS2_V2 = "Standard_DS2_v2" + STANDARD_DS2_V2_PROMO = "Standard_DS2_v2_Promo" + STANDARD_DS3 = "Standard_DS3" + STANDARD_DS3_V2 = "Standard_DS3_v2" + STANDARD_DS3_V2_PROMO = "Standard_DS3_v2_Promo" + STANDARD_DS4 = "Standard_DS4" + STANDARD_DS4_V2 = "Standard_DS4_v2" + STANDARD_DS4_V2_PROMO = "Standard_DS4_v2_Promo" + STANDARD_DS5_V2 = "Standard_DS5_v2" + STANDARD_DS5_V2_PROMO = "Standard_DS5_v2_Promo" + STANDARD_E16_V3 = "Standard_E16_v3" + STANDARD_E16_S_V3 = "Standard_E16s_v3" + STANDARD_E2_V3 = "Standard_E2_v3" + STANDARD_E2_S_V3 = "Standard_E2s_v3" + STANDARD_E32_16_S_V3 = "Standard_E32-16s_v3" + STANDARD_E32_8_S_V3 = "Standard_E32-8s_v3" + STANDARD_E32_V3 = "Standard_E32_v3" + STANDARD_E32_S_V3 = "Standard_E32s_v3" + STANDARD_E4_V3 = "Standard_E4_v3" + STANDARD_E4_S_V3 = "Standard_E4s_v3" + STANDARD_E64_16_S_V3 = "Standard_E64-16s_v3" + STANDARD_E64_32_S_V3 = "Standard_E64-32s_v3" + STANDARD_E64_V3 = "Standard_E64_v3" + STANDARD_E64_S_V3 = "Standard_E64s_v3" + STANDARD_E8_V3 = "Standard_E8_v3" + STANDARD_E8_S_V3 = "Standard_E8s_v3" + STANDARD_F1 = "Standard_F1" + STANDARD_F16 = "Standard_F16" + STANDARD_F16_S = "Standard_F16s" + STANDARD_F16_S_V2 = "Standard_F16s_v2" + STANDARD_F1_S = "Standard_F1s" + STANDARD_F2 = "Standard_F2" + STANDARD_F2_S = "Standard_F2s" + STANDARD_F2_S_V2 = "Standard_F2s_v2" + STANDARD_F32_S_V2 = "Standard_F32s_v2" + STANDARD_F4 = "Standard_F4" + STANDARD_F4_S = "Standard_F4s" + STANDARD_F4_S_V2 = "Standard_F4s_v2" + STANDARD_F64_S_V2 = "Standard_F64s_v2" + STANDARD_F72_S_V2 = "Standard_F72s_v2" + STANDARD_F8 = "Standard_F8" + STANDARD_F8_S = "Standard_F8s" + STANDARD_F8_S_V2 = "Standard_F8s_v2" + STANDARD_G1 = "Standard_G1" + STANDARD_G2 = "Standard_G2" + STANDARD_G3 = "Standard_G3" + STANDARD_G4 = "Standard_G4" + STANDARD_G5 = "Standard_G5" + STANDARD_GS1 = "Standard_GS1" + STANDARD_GS2 = "Standard_GS2" + STANDARD_GS3 = "Standard_GS3" + STANDARD_GS4 = "Standard_GS4" + STANDARD_GS4_4 = "Standard_GS4-4" + STANDARD_GS4_8 = "Standard_GS4-8" + STANDARD_GS5 = "Standard_GS5" + STANDARD_GS5_16 = "Standard_GS5-16" + STANDARD_GS5_8 = "Standard_GS5-8" + STANDARD_H16 = "Standard_H16" + STANDARD_H16_M = "Standard_H16m" + STANDARD_H16_MR = "Standard_H16mr" + STANDARD_H16_R = "Standard_H16r" + STANDARD_H8 = "Standard_H8" + STANDARD_H8_M = "Standard_H8m" + STANDARD_L16_S = "Standard_L16s" + STANDARD_L32_S = "Standard_L32s" + STANDARD_L4_S = "Standard_L4s" + STANDARD_L8_S = "Standard_L8s" + STANDARD_M128_32_MS = "Standard_M128-32ms" + STANDARD_M128_64_MS = "Standard_M128-64ms" + STANDARD_M128_MS = "Standard_M128ms" + STANDARD_M128_S = "Standard_M128s" + STANDARD_M64_16_MS = "Standard_M64-16ms" + STANDARD_M64_32_MS = "Standard_M64-32ms" + STANDARD_M64_MS = "Standard_M64ms" + STANDARD_M64_S = "Standard_M64s" + STANDARD_NC12 = "Standard_NC12" + STANDARD_NC12_S_V2 = "Standard_NC12s_v2" + STANDARD_NC12_S_V3 = "Standard_NC12s_v3" + STANDARD_NC24 = "Standard_NC24" + STANDARD_NC24_R = "Standard_NC24r" + STANDARD_NC24_RS_V2 = "Standard_NC24rs_v2" + STANDARD_NC24_RS_V3 = "Standard_NC24rs_v3" + STANDARD_NC24_S_V2 = "Standard_NC24s_v2" + STANDARD_NC24_S_V3 = "Standard_NC24s_v3" + STANDARD_NC6 = "Standard_NC6" + STANDARD_NC6_S_V2 = "Standard_NC6s_v2" + STANDARD_NC6_S_V3 = "Standard_NC6s_v3" + STANDARD_ND12_S = "Standard_ND12s" + STANDARD_ND24_RS = "Standard_ND24rs" + STANDARD_ND24_S = "Standard_ND24s" + STANDARD_ND6_S = "Standard_ND6s" + STANDARD_NV12 = "Standard_NV12" + STANDARD_NV24 = "Standard_NV24" + STANDARD_NV6 = "Standard_NV6" + +class Count(with_metaclass(_CaseInsensitiveEnumMeta, int, Enum)): + """Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The + default value is 1. + """ + + ONE = 1 + THREE = 3 + FIVE = 5 + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class Expander(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + LEAST_WASTE = "least-waste" + MOST_PODS = "most-pods" + PRIORITY = "priority" + RANDOM = "random" + +class ExtendedLocationTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of extendedLocation. + """ + + EDGE_ZONE = "EdgeZone" + +class GPUInstanceProfile(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. + """ + + MIG1_G = "MIG1g" + MIG2_G = "MIG2g" + MIG3_G = "MIG3g" + MIG4_G = "MIG4g" + MIG7_G = "MIG7g" + +class KubeletDiskType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """KubeletDiskType determines the placement of emptyDir volumes, container runtime data root, and + Kubelet ephemeral storage. Allowed values: 'OS', 'Temporary' (preview). + """ + + OS = "OS" + TEMPORARY = "Temporary" + +class LicenseType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User + Benefits for Windows VMs. + """ + + NONE = "None" + WINDOWS_SERVER = "Windows_Server" + +class LoadBalancerSku(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The load balancer sku for the managed cluster. + """ + + STANDARD = "standard" + BASIC = "basic" + +class ManagedClusterPodIdentityProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state of the pod identity. + """ + + ASSIGNED = "Assigned" + UPDATING = "Updating" + DELETING = "Deleting" + FAILED = "Failed" + +class ManagedClusterSKUName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of a managed cluster SKU. + """ + + BASIC = "Basic" + +class ManagedClusterSKUTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tier of a managed cluster SKU. + """ + + PAID = "Paid" + FREE = "Free" + +class NetworkMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network mode used for building Kubernetes network. + """ + + TRANSPARENT = "transparent" + BRIDGE = "bridge" + +class NetworkPlugin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network plugin used for building Kubernetes network. + """ + + AZURE = "azure" + KUBENET = "kubenet" + +class NetworkPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network policy used for building Kubernetes network. + """ + CALICO = "calico" + AZURE = "azure" -class OSDiskType(str, Enum): +class OSDiskType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """OSDiskType represents the type of an OS disk on an agent pool. + """ - managed = "Managed" - ephemeral = "Ephemeral" + MANAGED = "Managed" + EPHEMERAL = "Ephemeral" +class OSSKU(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner for Linux + OSType. Not applicable to Windows OSType. + """ -class KubeletDiskType(str, Enum): + UBUNTU = "Ubuntu" + CBL_MARINER = "CBLMariner" - os = "OS" - temporary = "Temporary" +class OSType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + """ + LINUX = "Linux" + WINDOWS = "Windows" + +class OutboundType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The outbound (egress) routing method. + """ + + LOAD_BALANCER = "loadBalancer" + USER_DEFINED_ROUTING = "userDefinedRouting" + +class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state. + """ -class OSType(str, Enum): + SUCCEEDED = "Succeeded" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" - linux = "Linux" - windows = "Windows" +class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly + created identity in master components and an auto-created user assigned identity in MC_ + resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, service + principal will be used instead. + """ + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + NONE = "None" -class OSSKU(str, Enum): +class ScaleSetEvictionPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale + set. Default to Delete. + """ - ubuntu = "Ubuntu" - cbl_mariner = "CBLMariner" + DELETE = "Delete" + DEALLOCATE = "Deallocate" +class ScaleSetPriority(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. + """ -class AgentPoolType(str, Enum): + SPOT = "Spot" + REGULAR = "Regular" - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" +class UpgradeChannel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """upgrade channel for auto upgrade. + """ - -class AgentPoolMode(str, Enum): - - system = "System" - user = "User" - - -class Code(str, Enum): - - running = "Running" - stopped = "Stopped" - - -class ScaleSetPriority(str, Enum): - - spot = "Spot" - regular = "Regular" - - -class ScaleSetEvictionPolicy(str, Enum): - - delete = "Delete" - deallocate = "Deallocate" - - -class GPUInstanceProfile(str, Enum): - - mig1g = "MIG1g" - mig2g = "MIG2g" - mig3g = "MIG3g" - mig4g = "MIG4g" - mig7g = "MIG7g" - - -class LicenseType(str, Enum): - - none = "None" - windows_server = "Windows_Server" - - -class NetworkPlugin(str, Enum): - - azure = "azure" - kubenet = "kubenet" - - -class NetworkPolicy(str, Enum): - - calico = "calico" - azure = "azure" - - -class NetworkMode(str, Enum): - - transparent = "transparent" - bridge = "bridge" - - -class OutboundType(str, Enum): - - load_balancer = "loadBalancer" - user_defined_routing = "userDefinedRouting" - - -class LoadBalancerSku(str, Enum): - - standard = "standard" - basic = "basic" - - -class CreatedByType(str, Enum): - - user = "User" - application = "Application" - managed_identity = "ManagedIdentity" - key = "Key" - - -class WeekDay(str, Enum): - - sunday = "Sunday" - monday = "Monday" - tuesday = "Tuesday" - wednesday = "Wednesday" - thursday = "Thursday" - friday = "Friday" - saturday = "Saturday" - - -class ManagedClusterPodIdentityProvisioningState(str, Enum): - - assigned = "Assigned" - updating = "Updating" - deleting = "Deleting" - failed = "Failed" - - -class UpgradeChannel(str, Enum): - - rapid = "rapid" - stable = "stable" - patch = "patch" - node_image = "node-image" - none = "none" - - -class Expander(str, Enum): - - least_waste = "least-waste" - most_pods = "most-pods" - priority = "priority" - random = "random" - - -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - none = "None" - - -class ManagedClusterSKUName(str, Enum): - - basic = "Basic" - - -class ManagedClusterSKUTier(str, Enum): - - paid = "Paid" - free = "Free" - - -class ExtendedLocationTypes(str, Enum): - - edge_zone = "EdgeZone" - - -class PrivateEndpointConnectionProvisioningState(str, Enum): - - succeeded = "Succeeded" - creating = "Creating" - deleting = "Deleting" - failed = "Failed" - - -class ConnectionStatus(str, Enum): - - pending = "Pending" - approved = "Approved" - rejected = "Rejected" - disconnected = "Disconnected" + RAPID = "rapid" + STABLE = "stable" + PATCH = "patch" + NODE_IMAGE = "node-image" + NONE = "none" + +class WeekDay(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The weekday enum. + """ + + SUNDAY = "Sunday" + MONDAY = "Monday" + TUESDAY = "Tuesday" + WEDNESDAY = "Wednesday" + THURSDAY = "Thursday" + FRIDAY = "Friday" + SATURDAY = "Saturday" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_models.py old mode 100644 new mode 100755 index fb6135bb98b..0df038e3e8e --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_models.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_models.py @@ -1,30 +1,25 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError +import msrest.serialization -class SubResource(Model): +class SubResource(msrest.serialization.Model): """Reference to another subresource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str """ @@ -40,7 +35,10 @@ class SubResource(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SubResource, self).__init__(**kwargs) self.id = None self.name = None @@ -50,139 +48,120 @@ def __init__(self, **kwargs): class AgentPool(SubResource): """Agent Pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 1000 (inclusive) for user pools and in - the range of 1 to 1000 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. :type count: int :param vm_size: Size of agent VMs. :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS", "Temporary". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param os_sku: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner + for Linux OSType. Not applicable to Windows OSType. Possible values include: "Ubuntu", + "CBLMariner". :type os_sku: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or + :param type_properties_type: AgentPoolType represents types of an agent pool. Possible values + include: "VirtualMachineScaleSets", "AvailabilitySet". + :type type_properties_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_05_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. + :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs assigned from this + Public IP Prefix. :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool - :param enable_ultra_ssd: Whether to enable UltraSSD + :param enable_ultra_ssd: Whether to enable UltraSSD. :type enable_ultra_ssd: bool - :param enable_fips: Whether to use FIPS enabled OS + :param enable_fips: Whether to use FIPS enabled OS. :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' + :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. Possible + values include: "MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g". :type gpu_instance_profile: str or ~azure.mgmt.containerservice.v2021_05_01.models.GPUInstanceProfile """ @@ -191,6 +170,7 @@ class AgentPool(SubResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -213,7 +193,7 @@ class AgentPool(SubResource): 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, 'min_count': {'key': 'properties.minCount', 'type': 'int'}, 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, 'mode': {'key': 'properties.mode', 'type': 'str'}, 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, @@ -238,7 +218,10 @@ class AgentPool(SubResource): 'gpu_instance_profile': {'key': 'properties.gpuInstanceProfile', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPool, self).__init__(**kwargs) self.count = kwargs.get('count', None) self.vm_size = kwargs.get('vm_size', None) @@ -253,7 +236,7 @@ def __init__(self, **kwargs): self.max_count = kwargs.get('max_count', None) self.min_count = kwargs.get('min_count', None) self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) - self.agent_pool_type = kwargs.get('agent_pool_type', None) + self.type_properties_type = kwargs.get('type_properties_type', None) self.mode = kwargs.get('mode', None) self.orchestrator_version = kwargs.get('orchestrator_version', None) self.node_image_version = None @@ -265,7 +248,7 @@ def __init__(self, **kwargs): self.node_public_ip_prefix_id = kwargs.get('node_public_ip_prefix_id', None) self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) + self.spot_max_price = kwargs.get('spot_max_price', -1) self.tags = kwargs.get('tags', None) self.node_labels = kwargs.get('node_labels', None) self.node_taints = kwargs.get('node_taints', None) @@ -278,11 +261,10 @@ def __init__(self, **kwargs): self.gpu_instance_profile = kwargs.get('gpu_instance_profile', None) -class AgentPoolAvailableVersions(Model): +class AgentPoolAvailableVersions(msrest.serialization.Model): """The list of available versions for an agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Id of the agent pool available versions. :vartype id: str @@ -308,7 +290,10 @@ class AgentPoolAvailableVersions(Model): 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolAvailableVersions, self).__init__(**kwargs) self.id = None self.name = None @@ -316,7 +301,7 @@ def __init__(self, **kwargs): self.agent_pool_versions = kwargs.get('agent_pool_versions', None) -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): +class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(msrest.serialization.Model): """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. :param default: Whether this version is the default agent pool version. @@ -333,18 +318,49 @@ class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) self.default = kwargs.get('default', None) self.kubernetes_version = kwargs.get('kubernetes_version', None) self.is_preview = kwargs.get('is_preview', None) -class AgentPoolUpgradeProfile(Model): +class AgentPoolListResult(msrest.serialization.Model): + """The response from the List Agent Pools operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of agent pools. + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool] + :ivar next_link: The URL to get the next set of agent pool results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AgentPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPoolListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class AgentPoolUpgradeProfile(msrest.serialization.Model): """The list of available upgrades for an agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -354,20 +370,16 @@ class AgentPoolUpgradeProfile(Model): :vartype name: str :ivar type: Type of the agent pool upgrade profile. :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. :type upgrades: list[~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. + :param latest_node_image_version: LatestNodeImageVersion is the latest AKS supported node image + version. :type latest_node_image_version: str """ @@ -389,18 +401,21 @@ class AgentPoolUpgradeProfile(Model): 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolUpgradeProfile, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.kubernetes_version = kwargs['kubernetes_version'] self.os_type = kwargs.get('os_type', "Linux") self.upgrades = kwargs.get('upgrades', None) self.latest_node_image_version = kwargs.get('latest_node_image_version', None) -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): +class AgentPoolUpgradeProfilePropertiesUpgradesItem(msrest.serialization.Model): """AgentPoolUpgradeProfilePropertiesUpgradesItem. :param kubernetes_version: Kubernetes version (major, minor, patch). @@ -414,17 +429,20 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) self.kubernetes_version = kwargs.get('kubernetes_version', None) self.is_preview = kwargs.get('is_preview', None) -class AgentPoolUpgradeSettings(Model): +class AgentPoolUpgradeSettings(msrest.serialization.Model): """Settings for upgrading an agentpool. - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default + :param max_surge: Count or percentage of additional nodes to be added during upgrade. If empty + uses AKS default. :type max_surge: str """ @@ -432,55 +450,47 @@ class AgentPoolUpgradeSettings(Model): 'max_surge': {'key': 'maxSurge', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(AgentPoolUpgradeSettings, self).__init__(**kwargs) self.max_surge = kwargs.get('max_surge', None) -class CloudError(Model): +class CloudError(msrest.serialization.Model): """An error response from the Container service. :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2021_05_01.models.CloudErrorBody + :type error: ~azure.mgmt.containerservice.v2021_05_01.models.CloudErrorBody """ _attribute_map = { 'error': {'key': 'error', 'type': 'CloudErrorBody'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CloudError, self).__init__(**kwargs) self.error = kwargs.get('error', None) -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): +class CloudErrorBody(msrest.serialization.Model): """An error response from the Container service. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: A message describing the error, intended to be suitable for display in a user + interface. :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. + :param target: The target of the particular error. For example, the name of the property in + error. :type target: str :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2021_05_01.models.CloudErrorBody] + :type details: list[~azure.mgmt.containerservice.v2021_05_01.models.CloudErrorBody] """ _attribute_map = { @@ -490,7 +500,10 @@ class CloudErrorBody(Model): 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CloudErrorBody, self).__init__(**kwargs) self.code = kwargs.get('code', None) self.message = kwargs.get('message', None) @@ -498,13 +511,255 @@ def __init__(self, **kwargs): self.details = kwargs.get('details', None) -class ContainerServiceDiagnosticsProfile(Model): +class Components1Q1Og48SchemasManagedclusterAllof1(msrest.serialization.Model): + """Components1Q1Og48SchemasManagedclusterAllof1. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. + :type kubernetes_version: str + :param dns_prefix: DNS prefix specified when creating the managed cluster. + :type dns_prefix: str + :param fqdn_subdomain: FQDN subdomain specified when creating private cluster with custom + private dns zone. + :type fqdn_subdomain: str + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + :ivar private_fqdn: FQDN of private cluster. + :vartype private_fqdn: str + :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy config. + :vartype azure_portal_fqdn: str + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAgentPoolProfile] + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceLinuxProfile + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterWindowsProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterServicePrincipalProfile + :param addon_profiles: Profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAddonProfile] + :param pod_identity_profile: Profile of managed cluster pod identity. + :type pod_identity_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentityProfile + :param node_resource_group: Name of the resource group containing agent pool nodes. + :type node_resource_group: str + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :type enable_rbac: bool + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. + :type enable_pod_security_policy: bool + :param network_profile: Profile of network configuration. + :type network_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceNetworkProfile + :param aad_profile: Profile of Azure Active Directory configuration. + :type aad_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile + :param auto_upgrade_profile: Profile of auto upgrade configuration. + :type auto_upgrade_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAutoUpgradeProfile + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. + :type auto_scaler_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPropertiesAutoScalerProfile + :param api_server_access_profile: Access profile for managed cluster API server. + :type api_server_access_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAPIServerAccessProfile + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. + :type disk_encryption_set_id: str + :param identity_profile: Identities associated with the cluster. + :type identity_profile: dict[str, + ~azure.mgmt.containerservice.v2021_05_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + :param private_link_resources: Private link resources associated with the cluster. + :type private_link_resources: + list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource] + :param disable_local_accounts: If set to true, getting static credential will be disabled for + this cluster. Expected to only be used for AAD clusters. + :type disable_local_accounts: bool + :param http_proxy_config: Configurations for provisioning the cluster with HTTP proxy servers. + :type http_proxy_config: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterHTTPProxyConfig + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + 'max_agent_pools': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'private_fqdn': {'readonly': True}, + 'azure_portal_fqdn': {'readonly': True}, + } + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, + 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn_subdomain': {'key': 'properties.fqdnSubdomain', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, + 'azure_portal_fqdn': {'key': 'properties.azurePortalFQDN', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, + 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, + 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, + 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, + 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, + 'private_link_resources': {'key': 'properties.privateLinkResources', 'type': '[PrivateLinkResource]'}, + 'disable_local_accounts': {'key': 'properties.disableLocalAccounts', 'type': 'bool'}, + 'http_proxy_config': {'key': 'properties.httpProxyConfig', 'type': 'ManagedClusterHTTPProxyConfig'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Q1Og48SchemasManagedclusterAllof1, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.provisioning_state = None + self.power_state = None + self.max_agent_pools = None + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.dns_prefix = kwargs.get('dns_prefix', None) + self.fqdn_subdomain = kwargs.get('fqdn_subdomain', None) + self.fqdn = None + self.private_fqdn = None + self.azure_portal_fqdn = None + self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) + self.linux_profile = kwargs.get('linux_profile', None) + self.windows_profile = kwargs.get('windows_profile', None) + self.service_principal_profile = kwargs.get('service_principal_profile', None) + self.addon_profiles = kwargs.get('addon_profiles', None) + self.pod_identity_profile = kwargs.get('pod_identity_profile', None) + self.node_resource_group = kwargs.get('node_resource_group', None) + self.enable_rbac = kwargs.get('enable_rbac', None) + self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) + self.network_profile = kwargs.get('network_profile', None) + self.aad_profile = kwargs.get('aad_profile', None) + self.auto_upgrade_profile = kwargs.get('auto_upgrade_profile', None) + self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) + self.api_server_access_profile = kwargs.get('api_server_access_profile', None) + self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) + self.identity_profile = kwargs.get('identity_profile', None) + self.private_link_resources = kwargs.get('private_link_resources', None) + self.disable_local_accounts = kwargs.get('disable_local_accounts', None) + self.http_proxy_config = kwargs.get('http_proxy_config', None) + + +class Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedIdentity(msrest.serialization.Model): + """UserAssignedIdentity. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.client_id = kwargs.get('client_id', None) + self.object_id = kwargs.get('object_id', None) + + +class ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties(UserAssignedIdentity): + """ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties, self).__init__(**kwargs) + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): """Profile for diagnostics on the container service cluster. All required parameters must be populated in order to send to Azure. - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. :type vm_diagnostics: ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceVMDiagnostics """ @@ -517,23 +772,23 @@ class ContainerServiceDiagnosticsProfile(Model): 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) - self.vm_diagnostics = kwargs.get('vm_diagnostics', None) + self.vm_diagnostics = kwargs['vm_diagnostics'] -class ContainerServiceLinuxProfile(Model): +class ContainerServiceLinuxProfile(msrest.serialization.Model): """Profile for Linux VMs in the container service cluster. All required parameters must be populated in order to send to Azure. - :param admin_username: Required. The administrator username to use for - Linux VMs. + :param admin_username: Required. The administrator username to use for Linux VMs. :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceSshConfiguration + :param ssh: Required. SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceSshConfiguration """ _validation = { @@ -546,93 +801,79 @@ class ContainerServiceLinuxProfile(Model): 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceLinuxProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) - self.ssh = kwargs.get('ssh', None) + self.admin_username = kwargs['admin_username'] + self.ssh = kwargs['ssh'] -class ContainerServiceMasterProfile(Model): +class ContainerServiceMasterProfile(msrest.serialization.Model): """Profile for the container service master. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. + :param count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2021_05_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". :type storage_profile: str or ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceStorageProfileTypes :ivar fqdn: FQDN for the master pool. @@ -642,6 +883,7 @@ class ContainerServiceMasterProfile(Model): _validation = { 'dns_prefix': {'required': True}, 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, 'fqdn': {'readonly': True}, } @@ -656,11 +898,14 @@ class ContainerServiceMasterProfile(Model): 'fqdn': {'key': 'fqdn', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceMasterProfile, self).__init__(**kwargs) - self.count = kwargs.get('count', 1) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.vm_size = kwargs.get('vm_size', None) + self.count = kwargs.get('count', "1") + self.dns_prefix = kwargs['dns_prefix'] + self.vm_size = kwargs['vm_size'] self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") @@ -668,46 +913,35 @@ def __init__(self, **kwargs): self.fqdn = None -class ContainerServiceNetworkProfile(Model): +class ContainerServiceNetworkProfile(msrest.serialization.Model): """Profile of network configuration. - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2021_05_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2021_05_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2021_05_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . + :param network_plugin: Network plugin used for building Kubernetes network. Possible values + include: "azure", "kubenet". Default value: "kubenet". + :type network_plugin: str or ~azure.mgmt.containerservice.v2021_05_01.models.NetworkPlugin + :param network_policy: Network policy used for building Kubernetes network. Possible values + include: "calico", "azure". + :type network_policy: str or ~azure.mgmt.containerservice.v2021_05_01.models.NetworkPolicy + :param network_mode: Network mode used for building Kubernetes network. Possible values + include: "transparent", "bridge". + :type network_mode: str or ~azure.mgmt.containerservice.v2021_05_01.models.NetworkMode + :param pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . + :param service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . + :param dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2021_05_01.models.LoadBalancerSku + :param outbound_type: The outbound (egress) routing method. Possible values include: + "loadBalancer", "userDefinedRouting". Default value: "loadBalancer". + :type outbound_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OutboundType + :param load_balancer_sku: The load balancer sku for the managed cluster. Possible values + include: "standard", "basic". + :type load_balancer_sku: str or ~azure.mgmt.containerservice.v2021_05_01.models.LoadBalancerSku :param load_balancer_profile: Profile of the cluster load balancer. :type load_balancer_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterLoadBalancerProfile @@ -733,7 +967,10 @@ class ContainerServiceNetworkProfile(Model): 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceNetworkProfile, self).__init__(**kwargs) self.network_plugin = kwargs.get('network_plugin', "kubenet") self.network_policy = kwargs.get('network_policy', None) @@ -747,13 +984,13 @@ def __init__(self, **kwargs): self.load_balancer_profile = kwargs.get('load_balancer_profile', None) -class ContainerServiceSshConfiguration(Model): +class ContainerServiceSshConfiguration(msrest.serialization.Model): """SSH configuration for Linux-based VMs running on Azure. All required parameters must be populated in order to send to Azure. - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. Only expect one key specified. :type public_keys: list[~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceSshPublicKey] """ @@ -766,19 +1003,21 @@ class ContainerServiceSshConfiguration(Model): 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceSshConfiguration, self).__init__(**kwargs) - self.public_keys = kwargs.get('public_keys', None) + self.public_keys = kwargs['public_keys'] -class ContainerServiceSshPublicKey(Model): +class ContainerServiceSshPublicKey(msrest.serialization.Model): """Contains information about SSH certificate public key data. All required parameters must be populated in order to send to Azure. - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. :type key_data: str """ @@ -790,24 +1029,24 @@ class ContainerServiceSshPublicKey(Model): 'key_data': {'key': 'keyData', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceSshPublicKey, self).__init__(**kwargs) - self.key_data = kwargs.get('key_data', None) + self.key_data = kwargs['key_data'] -class ContainerServiceVMDiagnostics(Model): +class ContainerServiceVMDiagnostics(msrest.serialization.Model): """Profile for diagnostics on the container service VMs. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. + :param enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. + :ivar storage_uri: The URI of the storage account where diagnostics are stored. :vartype storage_uri: str """ @@ -821,17 +1060,19 @@ class ContainerServiceVMDiagnostics(Model): 'storage_uri': {'key': 'storageUri', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) + self.enabled = kwargs['enabled'] self.storage_uri = None -class CredentialResult(Model): +class CredentialResult(msrest.serialization.Model): """The credential result response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar name: The name of the credential. :vartype name: str @@ -849,21 +1090,22 @@ class CredentialResult(Model): 'value': {'key': 'value', 'type': 'bytearray'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CredentialResult, self).__init__(**kwargs) self.name = None self.value = None -class CredentialResults(Model): +class CredentialResults(msrest.serialization.Model): """The list of credential result response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2021_05_01.models.CredentialResult] + :vartype kubeconfigs: list[~azure.mgmt.containerservice.v2021_05_01.models.CredentialResult] """ _validation = { @@ -874,20 +1116,21 @@ class CredentialResults(Model): 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(CredentialResults, self).__init__(**kwargs) self.kubeconfigs = None -class EndpointDependency(Model): +class EndpointDependency(msrest.serialization.Model): """A domain name that AKS agent nodes are reaching at. :param domain_name: The domain name of the dependency. :type domain_name: str - :param endpoint_details: The Ports and Protocols used when connecting to - domainName. - :type endpoint_details: - list[~azure.mgmt.containerservice.v2021_05_01.models.EndpointDetail] + :param endpoint_details: The Ports and Protocols used when connecting to domainName. + :type endpoint_details: list[~azure.mgmt.containerservice.v2021_05_01.models.EndpointDetail] """ _attribute_map = { @@ -895,22 +1138,25 @@ class EndpointDependency(Model): 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(EndpointDependency, self).__init__(**kwargs) self.domain_name = kwargs.get('domain_name', None) self.endpoint_details = kwargs.get('endpoint_details', None) -class EndpointDetail(Model): +class EndpointDetail(msrest.serialization.Model): """connect information from the AKS agent nodes to a single endpoint. :param ip_address: An IP Address that Domain Name currently resolves to. :type ip_address: str :param port: The port an endpoint is connected to. :type port: int - :param protocol: The protocol used for connection + :param protocol: The protocol used for connection. :type protocol: str - :param description: Description of the detail + :param description: Description of the detail. :type description: str """ @@ -921,7 +1167,10 @@ class EndpointDetail(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(EndpointDetail, self).__init__(**kwargs) self.ip_address = kwargs.get('ip_address', None) self.port = kwargs.get('port', None) @@ -929,15 +1178,13 @@ def __init__(self, **kwargs): self.description = kwargs.get('description', None) -class ExtendedLocation(Model): +class ExtendedLocation(msrest.serialization.Model): """The complex type of the extended location. :param name: The name of the extended location. :type name: str - :param type: The type of the extended location. Possible values include: - 'EdgeZone' - :type type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ExtendedLocationTypes + :param type: The type of the extended location. Possible values include: "EdgeZone". + :type type: str or ~azure.mgmt.containerservice.v2021_05_01.models.ExtendedLocationTypes """ _attribute_map = { @@ -945,41 +1192,43 @@ class ExtendedLocation(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ExtendedLocation, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.type = kwargs.get('type', None) -class KubeletConfig(Model): +class KubeletConfig(msrest.serialization.Model): """Kubelet configurations of agent nodes. :param cpu_manager_policy: CPU Manager policy to use. :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. + :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that specify CPU limits. :type cpu_cfs_quota: bool :param cpu_cfs_quota_period: Sets CPU CFS quota period value. :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. + :param image_gc_high_threshold: The percent of disk usage after which image garbage collection + is always run. :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. + :param image_gc_low_threshold: The percent of disk usage before which image garbage collection + is never run. :type image_gc_low_threshold: int :param topology_manager_policy: Topology Manager policy to use. :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). + :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe sysctl patterns (ending in + ``*``\ ). :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. + :param fail_swap_on: If set to true it will make the Kubelet fail to start if swap is enabled + on the node. :type fail_swap_on: bool - :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of - container log file before it is rotated. + :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of container log file before it + is rotated. :type container_log_max_size_mb: int - :param container_log_max_files: The maximum number of container log files - that can be present for a container. The number must be ≥ 2. + :param container_log_max_files: The maximum number of container log files that can be present + for a container. The number must be ≥ 2. :type container_log_max_files: int :param pod_max_pids: The maximum number of processes per pod. :type pod_max_pids: int @@ -1003,7 +1252,10 @@ class KubeletConfig(Model): 'pod_max_pids': {'key': 'podMaxPids', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(KubeletConfig, self).__init__(**kwargs) self.cpu_manager_policy = kwargs.get('cpu_manager_policy', None) self.cpu_cfs_quota = kwargs.get('cpu_cfs_quota', None) @@ -1018,20 +1270,17 @@ def __init__(self, **kwargs): self.pod_max_pids = kwargs.get('pod_max_pids', None) -class LinuxOSConfig(Model): +class LinuxOSConfig(msrest.serialization.Model): """OS configurations of Linux agent nodes. :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2021_05_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. + :type sysctls: ~azure.mgmt.containerservice.v2021_05_01.models.SysctlConfig + :param transparent_huge_page_enabled: Transparent Huge Page enabled configuration. :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. + :param transparent_huge_page_defrag: Transparent Huge Page defrag configuration. :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. + :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap file will be created on + each node. :type swap_file_size_mb: int """ @@ -1042,7 +1291,10 @@ class LinuxOSConfig(Model): 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(LinuxOSConfig, self).__init__(**kwargs) self.sysctls = kwargs.get('sysctls', None) self.transparent_huge_page_enabled = kwargs.get('transparent_huge_page_enabled', None) @@ -1053,25 +1305,21 @@ def __init__(self, **kwargs): class MaintenanceConfiguration(SubResource): """maintenance configuration. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str :ivar system_data: The system meta data relating to this resource. - :vartype system_data: - ~azure.mgmt.containerservice.v2021_05_01.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2021_05_01.models.SystemData :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2021_05_01.models.TimeInWeek] + :type time_in_week: list[~azure.mgmt.containerservice.v2021_05_01.models.TimeInWeek] :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2021_05_01.models.TimeSpan] + :type not_allowed_time: list[~azure.mgmt.containerservice.v2021_05_01.models.TimeSpan] """ _validation = { @@ -1090,30 +1338,61 @@ class MaintenanceConfiguration(SubResource): 'not_allowed_time': {'key': 'properties.notAllowedTime', 'type': '[TimeSpan]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(MaintenanceConfiguration, self).__init__(**kwargs) self.system_data = None self.time_in_week = kwargs.get('time_in_week', None) self.not_allowed_time = kwargs.get('not_allowed_time', None) -class Resource(Model): +class MaintenanceConfigurationListResult(msrest.serialization.Model): + """The response from the List maintenance configurations operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of maintenance configurations. + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration] + :ivar next_link: The URL to get the next set of maintenance configuration results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MaintenanceConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MaintenanceConfigurationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class Resource(msrest.serialization.Model): """The Resource model definition. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id + :ivar id: Resource Id. :vartype id: str - :ivar name: Resource name + :ivar name: Resource name. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param location: Required. Resource location + :param location: Required. Resource location. :type location: str - :param tags: Resource tags + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -1132,70 +1411,58 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = kwargs.get('location', None) + self.location = kwargs['location'] self.tags = kwargs.get('tags', None) -class ManagedCluster(Resource): +class ManagedCluster(Resource, Components1Q1Og48SchemasManagedclusterAllof1): """Managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2021_05_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. :type kubernetes_version: str :param dns_prefix: DNS prefix specified when creating the managed cluster. :type dns_prefix: str - :param fqdn_subdomain: FQDN subdomain specified when creating private - cluster with custom private dns zone. + :param fqdn_subdomain: FQDN subdomain specified when creating private cluster with custom + private dns zone. :type fqdn_subdomain: str :ivar fqdn: FQDN for the master pool. :vartype fqdn: str :ivar private_fqdn: FQDN of private cluster. :vartype private_fqdn: str - :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy - config. + :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy config. :vartype azure_portal_fqdn: str :param agent_pool_profiles: Properties of the agent pool. :type agent_pool_profiles: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. + :param linux_profile: Profile for Linux VMs in the container service cluster. :type linux_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. + :param windows_profile: Profile for Windows VMs in the container service cluster. :type windows_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. :type service_principal_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterServicePrincipalProfile :param addon_profiles: Profile of managed cluster add-on. @@ -1204,81 +1471,74 @@ class ManagedCluster(Resource): :param pod_identity_profile: Profile of managed cluster pod identity. :type pod_identity_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. + :param node_resource_group: Name of the resource group containing agent pool nodes. :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. :type enable_pod_security_policy: bool :param network_profile: Profile of network configuration. :type network_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceNetworkProfile :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile + :type aad_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile :param auto_upgrade_profile: Profile of auto upgrade configuration. :type auto_upgrade_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. :type auto_scaler_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. + :param api_server_access_profile: Access profile for managed cluster API server. :type api_server_access_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. :type disk_encryption_set_id: str :param identity_profile: Identities associated with the cluster. :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param private_link_resources: Private link resources associated with the - cluster. + ~azure.mgmt.containerservice.v2021_05_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + :param private_link_resources: Private link resources associated with the cluster. :type private_link_resources: list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource] - :param disable_local_accounts: If set to true, getting static credential - will be disabled for this cluster. Expected to only be used for AAD - clusters. + :param disable_local_accounts: If set to true, getting static credential will be disabled for + this cluster. Expected to only be used for AAD clusters. :type disable_local_accounts: bool - :param http_proxy_config: Configurations for provisioning the cluster with - HTTP proxy servers. + :param http_proxy_config: Configurations for provisioning the cluster with HTTP proxy servers. :type http_proxy_config: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterHTTPProxyConfig - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterIdentity + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKU + :type sku: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKU :param extended_location: The extended location of the Virtual Machine. - :type extended_location: - ~azure.mgmt.containerservice.v2021_05_01.models.ExtendedLocation + :type extended_location: ~azure.mgmt.containerservice.v2021_05_01.models.ExtendedLocation """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, 'max_agent_pools': {'readonly': True}, 'fqdn': {'readonly': True}, 'private_fqdn': {'readonly': True}, 'azure_portal_fqdn': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, @@ -1303,17 +1563,25 @@ class ManagedCluster(Resource): 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, 'private_link_resources': {'key': 'properties.privateLinkResources', 'type': '[PrivateLinkResource]'}, 'disable_local_accounts': {'key': 'properties.disableLocalAccounts', 'type': 'bool'}, 'http_proxy_config': {'key': 'properties.httpProxyConfig', 'type': 'ManagedClusterHTTPProxyConfig'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedCluster, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) self.provisioning_state = None self.power_state = None self.max_agent_pools = None @@ -1342,48 +1610,55 @@ def __init__(self, **kwargs): self.private_link_resources = kwargs.get('private_link_resources', None) self.disable_local_accounts = kwargs.get('disable_local_accounts', None) self.http_proxy_config = kwargs.get('http_proxy_config', None) - self.identity = kwargs.get('identity', None) + self.sku = kwargs.get('sku', None) + self.extended_location = kwargs.get('extended_location', None) + self.id = None + self.name = None + self.type = None + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) self.sku = kwargs.get('sku', None) self.extended_location = kwargs.get('extended_location', None) -class ManagedClusterAADProfile(Model): +class ManagedClusterAADProfile(msrest.serialization.Model): """AADProfile specifies attributes for Azure Active Directory integration. :param managed: Whether to enable managed AAD. :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. + :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes authorization. :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] + :param admin_group_object_i_ds: AAD group object IDs that will have admin role of the cluster. + :type admin_group_object_i_ds: list[str] :param client_app_id: The client AAD application ID. :type client_app_id: str :param server_app_id: The server AAD application ID. :type server_app_id: str :param server_app_secret: The server AAD application secret. :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. + :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. :type tenant_id: str """ _attribute_map = { 'managed': {'key': 'managed', 'type': 'bool'}, 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, + 'admin_group_object_i_ds': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, 'tenant_id': {'key': 'tenantID', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAADProfile, self).__init__(**kwargs) self.managed = kwargs.get('managed', None) self.enable_azure_rbac = kwargs.get('enable_azure_rbac', None) - self.admin_group_object_ids = kwargs.get('admin_group_object_ids', None) + self.admin_group_object_i_ds = kwargs.get('admin_group_object_i_ds', None) self.client_app_id = kwargs.get('client_app_id', None) self.server_app_id = kwargs.get('server_app_id', None) self.server_app_secret = kwargs.get('server_app_secret', None) @@ -1393,20 +1668,19 @@ def __init__(self, **kwargs): class ManagedClusterAccessProfile(Resource): """Managed cluster Access Profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id + :ivar id: Resource Id. :vartype id: str - :ivar name: Resource name + :ivar name: Resource name. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param location: Required. Resource location + :param location: Required. Resource location. :type location: str - :param tags: Resource tags + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param kube_config: Base64-encoded Kubernetes configuration file. :type kube_config: bytearray @@ -1428,16 +1702,18 @@ class ManagedClusterAccessProfile(Resource): 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAccessProfile, self).__init__(**kwargs) self.kube_config = kwargs.get('kube_config', None) -class ManagedClusterAddonProfile(Model): +class ManagedClusterAddonProfile(msrest.serialization.Model): """A Kubernetes add-on profile for a managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -1461,37 +1737,16 @@ class ManagedClusterAddonProfile(Model): 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAddonProfile, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) + self.enabled = kwargs['enabled'] self.config = kwargs.get('config', None) self.identity = None -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - - class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): """Information of user assigned identity used by this add-on. @@ -1509,144 +1764,128 @@ class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): 'object_id': {'key': 'objectId', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) -class ManagedClusterAgentPoolProfileProperties(Model): +class ManagedClusterAgentPoolProfileProperties(msrest.serialization.Model): """Properties for the container service agent pool profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 1000 (inclusive) for user pools and in - the range of 1 to 1000 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. :type count: int :param vm_size: Size of agent VMs. :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS", "Temporary". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param os_sku: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner + for Linux OSType. Not applicable to Windows OSType. Possible values include: "Ubuntu", + "CBLMariner". :type os_sku: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_05_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. + :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs assigned from this + Public IP Prefix. :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool - :param enable_ultra_ssd: Whether to enable UltraSSD + :param enable_ultra_ssd: Whether to enable UltraSSD. :type enable_ultra_ssd: bool - :param enable_fips: Whether to use FIPS enabled OS + :param enable_fips: Whether to use FIPS enabled OS. :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' + :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. Possible + values include: "MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g". :type gpu_instance_profile: str or ~azure.mgmt.containerservice.v2021_05_01.models.GPUInstanceProfile """ _validation = { + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -1691,7 +1930,10 @@ class ManagedClusterAgentPoolProfileProperties(Model): 'gpu_instance_profile': {'key': 'gpuInstanceProfile', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) self.count = kwargs.get('count', None) self.vm_size = kwargs.get('vm_size', None) @@ -1718,7 +1960,7 @@ def __init__(self, **kwargs): self.node_public_ip_prefix_id = kwargs.get('node_public_ip_prefix_id', None) self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") - self.spot_max_price = kwargs.get('spot_max_price', None) + self.spot_max_price = kwargs.get('spot_max_price', -1) self.tags = kwargs.get('tags', None) self.node_labels = kwargs.get('node_labels', None) self.node_taints = kwargs.get('node_taints', None) @@ -1734,142 +1976,123 @@ def __init__(self, **kwargs): class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): """Profile for the container service agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 1000 (inclusive) for user pools and in - the range of 1 to 1000 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. :type count: int :param vm_size: Size of agent VMs. :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS", "Temporary". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param os_sku: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner + for Linux OSType. Not applicable to Windows OSType. Possible values include: "Ubuntu", + "CBLMariner". :type os_sku: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_05_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. + :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs assigned from this + Public IP Prefix. :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool - :param enable_ultra_ssd: Whether to enable UltraSSD + :param enable_ultra_ssd: Whether to enable UltraSSD. :type enable_ultra_ssd: bool - :param enable_fips: Whether to use FIPS enabled OS + :param enable_fips: Whether to use FIPS enabled OS. :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' + :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. Possible + values include: "MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g". :type gpu_instance_profile: str or ~azure.mgmt.containerservice.v2021_05_01.models.GPUInstanceProfile - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. + :param name: Required. Unique name of the agent pool profile in the context of the subscription + and resource group. :type name: str """ _validation = { + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -1916,24 +2139,25 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): 'name': {'key': 'name', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) + self.name = kwargs['name'] -class ManagedClusterAPIServerAccessProfile(Model): +class ManagedClusterAPIServerAccessProfile(msrest.serialization.Model): """Access profile for managed cluster API server. - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. + :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. + :param enable_private_cluster: Whether to create the cluster as a private cluster or not. :type enable_private_cluster: bool :param private_dns_zone: Private dns zone mode for private cluster. :type private_dns_zone: str - :param enable_private_cluster_public_fqdn: Whether to create additional - public FQDN for private cluster or not. + :param enable_private_cluster_public_fqdn: Whether to create additional public FQDN for private + cluster or not. :type enable_private_cluster_public_fqdn: bool """ @@ -1944,7 +2168,10 @@ class ManagedClusterAPIServerAccessProfile(Model): 'enable_private_cluster_public_fqdn': {'key': 'enablePrivateClusterPublicFQDN', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) self.enable_private_cluster = kwargs.get('enable_private_cluster', None) @@ -1952,25 +2179,27 @@ def __init__(self, **kwargs): self.enable_private_cluster_public_fqdn = kwargs.get('enable_private_cluster_public_fqdn', None) -class ManagedClusterAutoUpgradeProfile(Model): +class ManagedClusterAutoUpgradeProfile(msrest.serialization.Model): """Auto upgrade profile for a managed cluster. - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'node-image', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2021_05_01.models.UpgradeChannel + :param upgrade_channel: upgrade channel for auto upgrade. Possible values include: "rapid", + "stable", "patch", "node-image", "none". + :type upgrade_channel: str or ~azure.mgmt.containerservice.v2021_05_01.models.UpgradeChannel """ _attribute_map = { 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) self.upgrade_channel = kwargs.get('upgrade_channel', None) -class ManagedClusterHTTPProxyConfig(Model): +class ManagedClusterHTTPProxyConfig(msrest.serialization.Model): """Configurations for provisioning the cluster with HTTP proxy servers. :param http_proxy: HTTP proxy server endpoint to use. @@ -1979,8 +2208,7 @@ class ManagedClusterHTTPProxyConfig(Model): :type https_proxy: str :param no_proxy: Endpoints that should not go through proxy. :type no_proxy: list[str] - :param trusted_ca: Alternative CA cert to use for connecting to proxy - servers. + :param trusted_ca: Alternative CA cert to use for connecting to proxy servers. :type trusted_ca: str """ @@ -1991,7 +2219,10 @@ class ManagedClusterHTTPProxyConfig(Model): 'trusted_ca': {'key': 'trustedCa', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterHTTPProxyConfig, self).__init__(**kwargs) self.http_proxy = kwargs.get('http_proxy', None) self.https_proxy = kwargs.get('https_proxy', None) @@ -1999,33 +2230,29 @@ def __init__(self, **kwargs): self.trusted_ca = kwargs.get('trusted_ca', None) -class ManagedClusterIdentity(Model): +class ManagedClusterIdentity(msrest.serialization.Model): """Identity for the managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. + :ivar principal_id: The principal id of the system assigned identity which is used by master + components. :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. + :ivar tenant_id: The tenant id of the system assigned identity which is used by master + components. :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: + :param type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use + an implicitly created identity in master components and an auto-created user assigned identity + in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, + service principal will be used instead. Possible values include: "SystemAssigned", + "UserAssigned", "None". + :type type: str or ~azure.mgmt.containerservice.v2021_05_01.models.ResourceIdentityType + :param user_assigned_identities: The user identity associated with the managed cluster. This + identity will be used in control plane and only one user assigned identity is allowed. The user + identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] + ~azure.mgmt.containerservice.v2021_05_01.models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties] """ _validation = { @@ -2036,11 +2263,14 @@ class ManagedClusterIdentity(Model): _attribute_map = { 'principal_id': {'key': 'principalId', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None @@ -2048,61 +2278,58 @@ def __init__(self, **kwargs): self.user_assigned_identities = kwargs.get('user_assigned_identities', None) -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. +class ManagedClusterListResult(msrest.serialization.Model): + """The response from the List Managed Clusters operation. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str + :param value: The list of managed clusters. + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] + :ivar next_link: The URL to get the next set of managed cluster results. + :vartype next_link: str """ _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, + 'next_link': {'readonly': True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ManagedCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, **kwargs): - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None + def __init__( + self, + **kwargs + ): + super(ManagedClusterListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None -class ManagedClusterLoadBalancerProfile(Model): +class ManagedClusterLoadBalancerProfile(msrest.serialization.Model): """Profile of the managed cluster load balancer. - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: + :param managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. + :type managed_outbound_i_ps: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. + :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the cluster load + balancer. :type outbound_ip_prefixes: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: + :param outbound_i_ps: Desired outbound IP resources for the cluster load balancer. + :type outbound_i_ps: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: + :param effective_outbound_i_ps: The effective outbound IP resources of the cluster load + balancer. + :type effective_outbound_i_ps: list[~azure.mgmt.containerservice.v2021_05_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . + :param allocated_outbound_ports: Desired number of allocated SNAT ports per VM. Allowed values + must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure + dynamically allocating ports. :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . + :param idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + must be in the range of 4 to 120 (inclusive). The default value is 30 minutes. :type idle_timeout_in_minutes: int """ @@ -2112,30 +2339,32 @@ class ManagedClusterLoadBalancerProfile(Model): } _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, + 'managed_outbound_i_ps': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, + 'outbound_i_ps': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, + 'effective_outbound_i_ps': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = kwargs.get('managed_outbound_ips', None) + self.managed_outbound_i_ps = kwargs.get('managed_outbound_i_ps', None) self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) - self.outbound_ips = kwargs.get('outbound_ips', None) - self.effective_outbound_ips = kwargs.get('effective_outbound_ips', None) + self.outbound_i_ps = kwargs.get('outbound_i_ps', None) + self.effective_outbound_i_ps = kwargs.get('effective_outbound_i_ps', None) self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): +class ManagedClusterLoadBalancerProfileManagedOutboundIPs(msrest.serialization.Model): """Desired managed outbound IPs for the cluster load balancer. - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . + :param count: Desired number of outbound IP created/managed by Azure for the cluster load + balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. :type count: int """ @@ -2147,12 +2376,15 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): 'count': {'key': 'count', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) self.count = kwargs.get('count', 1) -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): +class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(msrest.serialization.Model): """Desired outbound IP Prefix resources for the cluster load balancer. :param public_ip_prefixes: A list of public IP prefix resources. @@ -2164,33 +2396,37 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): +class ManagedClusterLoadBalancerProfileOutboundIPs(msrest.serialization.Model): """Desired outbound IP resources for the cluster load balancer. - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2021_05_01.models.ResourceReference] + :param public_i_ps: A list of public IP resources. + :type public_i_ps: list[~azure.mgmt.containerservice.v2021_05_01.models.ResourceReference] """ _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, + 'public_i_ps': {'key': 'publicIPs', 'type': '[ResourceReference]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = kwargs.get('public_ips', None) + self.public_i_ps = kwargs.get('public_i_ps', None) -class ManagedClusterPodIdentity(Model): +class ManagedClusterPodIdentity(msrest.serialization.Model): """ManagedClusterPodIdentity. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2198,15 +2434,12 @@ class ManagedClusterPodIdentity(Model): :type name: str :param namespace: Required. Namespace of the pod identity. :type namespace: str - :param binding_selector: Binding selector to use for the - AzureIdentityBinding resource. + :param binding_selector: Binding selector to use for the AzureIdentityBinding resource. :type binding_selector: str :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2021_05_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' + :type identity: ~azure.mgmt.containerservice.v2021_05_01.models.UserAssignedIdentity + :ivar provisioning_state: The current provisioning state of the pod identity. Possible values + include: "Assigned", "Updating", "Deleting", "Failed". :vartype provisioning_state: str or ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentityProvisioningState :ivar provisioning_info: @@ -2231,17 +2464,20 @@ class ManagedClusterPodIdentity(Model): 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPodIdentity, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) + self.name = kwargs['name'] + self.namespace = kwargs['namespace'] self.binding_selector = kwargs.get('binding_selector', None) - self.identity = kwargs.get('identity', None) + self.identity = kwargs['identity'] self.provisioning_state = None self.provisioning_info = None -class ManagedClusterPodIdentityException(Model): +class ManagedClusterPodIdentityException(msrest.serialization.Model): """ManagedClusterPodIdentityException. All required parameters must be populated in order to send to Azure. @@ -2266,26 +2502,28 @@ class ManagedClusterPodIdentityException(Model): 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPodIdentityException, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.pod_labels = kwargs.get('pod_labels', None) + self.name = kwargs['name'] + self.namespace = kwargs['namespace'] + self.pod_labels = kwargs['pod_labels'] -class ManagedClusterPodIdentityProfile(Model): +class ManagedClusterPodIdentityProfile(msrest.serialization.Model): """ManagedClusterPodIdentityProfile. :param enabled: Whether the pod identity addon is enabled. :type enabled: bool - :param allow_network_plugin_kubenet: Customer consent for enabling AAD pod - identity addon in cluster using Kubenet network plugin. + :param allow_network_plugin_kubenet: Customer consent for enabling AAD pod identity addon in + cluster using Kubenet network plugin. :type allow_network_plugin_kubenet: bool :param user_assigned_identities: User assigned pod identity settings. :type user_assigned_identities: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. + :param user_assigned_identity_exceptions: User assigned pod identity exception settings. :type user_assigned_identity_exceptions: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentityException] """ @@ -2297,7 +2535,10 @@ class ManagedClusterPodIdentityProfile(Model): 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) self.enabled = kwargs.get('enabled', None) self.allow_network_plugin_kubenet = kwargs.get('allow_network_plugin_kubenet', None) @@ -2305,7 +2546,7 @@ def __init__(self, **kwargs): self.user_assigned_identity_exceptions = kwargs.get('user_assigned_identity_exceptions', None) -class ManagedClusterPodIdentityProvisioningInfo(Model): +class ManagedClusterPodIdentityProvisioningInfo(msrest.serialization.Model): """ManagedClusterPodIdentityProvisioningInfo. :param error: Pod identity assignment error (if any). @@ -2316,28 +2557,27 @@ class ManagedClusterPodIdentityProvisioningInfo(Model): 'error': {'key': 'error', 'type': 'CloudError'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) self.error = kwargs.get('error', None) -class ManagedClusterPoolUpgradeProfile(Model): +class ManagedClusterPoolUpgradeProfile(msrest.serialization.Model): """The list of available upgrade versions. All required parameters must be populated in order to send to Azure. - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). :type kubernetes_version: str :param name: Pool name. :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. :type upgrades: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] """ @@ -2354,15 +2594,18 @@ class ManagedClusterPoolUpgradeProfile(Model): 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) - self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.kubernetes_version = kwargs['kubernetes_version'] self.name = kwargs.get('name', None) self.os_type = kwargs.get('os_type', "Linux") self.upgrades = kwargs.get('upgrades', None) -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): +class ManagedClusterPoolUpgradeProfileUpgradesItem(msrest.serialization.Model): """ManagedClusterPoolUpgradeProfileUpgradesItem. :param kubernetes_version: Kubernetes version (major, minor, patch). @@ -2376,21 +2619,22 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) self.kubernetes_version = kwargs.get('kubernetes_version', None) self.is_preview = kwargs.get('is_preview', None) -class ManagedClusterPropertiesAutoScalerProfile(Model): +class ManagedClusterPropertiesAutoScalerProfile(msrest.serialization.Model): """Parameters to be applied to the cluster-autoscaler when enabled. :param balance_similar_node_groups: :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'priority', 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2021_05_01.models.Expander + :param expander: Possible values include: "least-waste", "most-pods", "priority", "random". + :type expander: str or ~azure.mgmt.containerservice.v2021_05_01.models.Expander :param max_empty_bulk_delete: :type max_empty_bulk_delete: str :param max_graceful_termination_sec: @@ -2443,7 +2687,10 @@ class ManagedClusterPropertiesAutoScalerProfile(Model): 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) self.expander = kwargs.get('expander', None) @@ -2464,37 +2711,14 @@ def __init__(self, **kwargs): self.skip_nodes_with_system_pods = kwargs.get('skip_nodes_with_system_pods', None) -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(**kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. +class ManagedClusterServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. All required parameters must be populated in order to send to Azure. :param client_id: Required. The ID for the service principal. :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. + :param secret: The secret password associated with the service principal in plain text. :type secret: str """ @@ -2507,23 +2731,22 @@ class ManagedClusterServicePrincipalProfile(Model): 'secret': {'key': 'secret', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) + self.client_id = kwargs['client_id'] self.secret = kwargs.get('secret', None) -class ManagedClusterSKU(Model): +class ManagedClusterSKU(msrest.serialization.Model): """ManagedClusterSKU. - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKUTier + :param name: Name of a managed cluster SKU. Possible values include: "Basic". + :type name: str or ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKUName + :param tier: Tier of a managed cluster SKU. Possible values include: "Paid", "Free". + :type tier: str or ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKUTier """ _attribute_map = { @@ -2531,17 +2754,19 @@ class ManagedClusterSKU(Model): 'tier': {'key': 'tier', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterSKU, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.tier = kwargs.get('tier', None) -class ManagedClusterUpgradeProfile(Model): +class ManagedClusterUpgradeProfile(msrest.serialization.Model): """The list of available upgrades for compute pools. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2551,12 +2776,11 @@ class ManagedClusterUpgradeProfile(Model): :vartype name: str :ivar type: Type of upgrade profile. :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. + :param control_plane_profile: Required. The list of available upgrade versions for the control + plane. :type control_plane_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. + :param agent_pool_profiles: Required. The list of available upgrade versions for agent pools. :type agent_pool_profiles: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPoolUpgradeProfile] """ @@ -2577,43 +2801,42 @@ class ManagedClusterUpgradeProfile(Model): 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.control_plane_profile = kwargs.get('control_plane_profile', None) - self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) + self.control_plane_profile = kwargs['control_plane_profile'] + self.agent_pool_profiles = kwargs['agent_pool_profiles'] -class ManagedClusterWindowsProfile(Model): +class ManagedClusterWindowsProfile(msrest.serialization.Model): """Profile for Windows VMs in the container service cluster. All required parameters must be populated in order to send to Azure. - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters + :param admin_username: Required. Specifies the name of the administrator account. + :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", + "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", + "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + "sys", "test2", "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 + character :code:`
`:code:`
` **Max-length:** 20 characters. :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" + :param admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` + **Max-length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.LicenseType + :param license_type: The licenseType to use for Windows VMs. Windows_Server is used to enable + Azure Hybrid User Benefits for Windows VMs. Possible values include: "None", "Windows_Server". + :type license_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.LicenseType :param enable_csi_proxy: Whether to enable CSI proxy. :type enable_csi_proxy: bool """ @@ -2629,19 +2852,46 @@ class ManagedClusterWindowsProfile(Model): 'enable_csi_proxy': {'key': 'enableCSIProxy', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ManagedClusterWindowsProfile, self).__init__(**kwargs) - self.admin_username = kwargs.get('admin_username', None) + self.admin_username = kwargs['admin_username'] self.admin_password = kwargs.get('admin_password', None) self.license_type = kwargs.get('license_type', None) self.enable_csi_proxy = kwargs.get('enable_csi_proxy', None) -class OperationValue(Model): +class OperationListResult(msrest.serialization.Model): + """The List Compute Operation operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of compute operations. + :vartype value: list[~azure.mgmt.containerservice.v2021_05_01.models.OperationValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationValue]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + + +class OperationValue(msrest.serialization.Model): """Describes the properties of a Compute Operation value. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar origin: The origin of the compute operation. :vartype origin: str @@ -2675,7 +2925,10 @@ class OperationValue(Model): 'provider': {'key': 'display.provider', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(OperationValue, self).__init__(**kwargs) self.origin = None self.name = None @@ -2685,11 +2938,10 @@ def __init__(self, **kwargs): self.provider = None -class OSOptionProfile(Model): +class OSOptionProfile(msrest.serialization.Model): """The OS option profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2699,8 +2951,7 @@ class OSOptionProfile(Model): :vartype name: str :ivar type: Type of the OS option profile. :vartype type: str - :param os_option_property_list: Required. The list of OS option - properties. + :param os_option_property_list: Required. The list of OS option properties. :type os_option_property_list: list[~azure.mgmt.containerservice.v2021_05_01.models.OSOptionProperty] """ @@ -2719,15 +2970,18 @@ class OSOptionProfile(Model): 'os_option_property_list': {'key': 'properties.osOptionPropertyList', 'type': '[OSOptionProperty]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(OSOptionProfile, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.os_option_property_list = kwargs.get('os_option_property_list', None) + self.os_option_property_list = kwargs['os_option_property_list'] -class OSOptionProperty(Model): +class OSOptionProperty(msrest.serialization.Model): """OS option property. All required parameters must be populated in order to send to Azure. @@ -2748,21 +3002,23 @@ class OSOptionProperty(Model): 'enable_fips_image': {'key': 'enable-fips-image', 'type': 'bool'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(OSOptionProperty, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.enable_fips_image = kwargs.get('enable_fips_image', None) + self.os_type = kwargs['os_type'] + self.enable_fips_image = kwargs['enable_fips_image'] -class OutboundEnvironmentEndpoint(Model): +class OutboundEnvironmentEndpoint(msrest.serialization.Model): """Egress endpoints which AKS agent nodes connect to for common purpose. - :param category: The category of endpoints accessed by the AKS agent node, - e.g. azure-resource-management, apiserver, etc. + :param category: The category of endpoints accessed by the AKS agent node, e.g. + azure-resource-management, apiserver, etc. :type category: str - :param endpoints: The endpoints that AKS agent nodes connect to - :type endpoints: - list[~azure.mgmt.containerservice.v2021_05_01.models.EndpointDependency] + :param endpoints: The endpoints that AKS agent nodes connect to. + :type endpoints: list[~azure.mgmt.containerservice.v2021_05_01.models.EndpointDependency] """ _attribute_map = { @@ -2770,17 +3026,52 @@ class OutboundEnvironmentEndpoint(Model): 'endpoints': {'key': 'endpoints', 'type': '[EndpointDependency]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) self.category = kwargs.get('category', None) self.endpoints = kwargs.get('endpoints', None) -class PowerState(Model): +class OutboundEnvironmentEndpointCollection(msrest.serialization.Model): + """Collection of OutboundEnvironmentEndpoint. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.OutboundEnvironmentEndpoint] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OutboundEnvironmentEndpointCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class PowerState(msrest.serialization.Model): """Describes the Power State of the cluster. - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' + :param code: Tells whether the cluster is Running or Stopped. Possible values include: + "Running", "Stopped". :type code: str or ~azure.mgmt.containerservice.v2021_05_01.models.Code """ @@ -2788,15 +3079,18 @@ class PowerState(Model): 'code': {'key': 'code', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PowerState, self).__init__(**kwargs) self.code = kwargs.get('code', None) -class PrivateEndpoint(Model): +class PrivateEndpoint(msrest.serialization.Model): """Private endpoint which a connection belongs to. - :param id: The resource Id for private endpoint + :param id: The resource Id for private endpoint. :type id: str """ @@ -2804,18 +3098,18 @@ class PrivateEndpoint(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateEndpoint, self).__init__(**kwargs) self.id = kwargs.get('id', None) -class PrivateEndpointConnection(Model): +class PrivateEndpointConnection(msrest.serialization.Model): """A private endpoint connection. - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The ID of the private endpoint connection. :vartype id: str @@ -2823,16 +3117,14 @@ class PrivateEndpointConnection(Model): :vartype name: str :ivar type: The resource type. :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' + :ivar provisioning_state: The current provisioning state. Possible values include: "Succeeded", + "Creating", "Deleting", "Failed". :vartype provisioning_state: str or ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnectionProvisioningState :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. + :type private_endpoint: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. :type private_link_service_connection_state: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkServiceConnectionState """ @@ -2842,7 +3134,6 @@ class PrivateEndpointConnection(Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, } _attribute_map = { @@ -2854,7 +3145,10 @@ class PrivateEndpointConnection(Model): 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateEndpointConnection, self).__init__(**kwargs) self.id = None self.name = None @@ -2864,28 +3158,29 @@ def __init__(self, **kwargs): self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) -class PrivateEndpointConnectionListResult(Model): +class PrivateEndpointConnectionListResult(msrest.serialization.Model): """A list of private endpoint connections. :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection] + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection] """ _attribute_map = { 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) self.value = kwargs.get('value', None) -class PrivateLinkResource(Model): +class PrivateLinkResource(msrest.serialization.Model): """A private link resource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :param id: The ID of the private link resource. :type id: str @@ -2895,10 +3190,10 @@ class PrivateLinkResource(Model): :type type: str :param group_id: The group ID of the resource. :type group_id: str - :param required_members: RequiredMembers of the resource + :param required_members: RequiredMembers of the resource. :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. + :ivar private_link_service_id: The private link service ID of the resource, this field is + exposed only to NRP internally. :vartype private_link_service_id: str """ @@ -2915,7 +3210,10 @@ class PrivateLinkResource(Model): 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateLinkResource, self).__init__(**kwargs) self.id = kwargs.get('id', None) self.name = kwargs.get('name', None) @@ -2925,30 +3223,31 @@ def __init__(self, **kwargs): self.private_link_service_id = None -class PrivateLinkResourcesListResult(Model): +class PrivateLinkResourcesListResult(msrest.serialization.Model): """A list of private link resources. :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource] + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource] """ _attribute_map = { 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateLinkResourcesListResult, self).__init__(**kwargs) self.value = kwargs.get('value', None) -class PrivateLinkServiceConnectionState(Model): +class PrivateLinkServiceConnectionState(msrest.serialization.Model): """The state of a private link service connection. - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ConnectionStatus + :param status: The private link service connection status. Possible values include: "Pending", + "Approved", "Rejected", "Disconnected". + :type status: str or ~azure.mgmt.containerservice.v2021_05_01.models.ConnectionStatus :param description: The private link service connection description. :type description: str """ @@ -2958,13 +3257,16 @@ class PrivateLinkServiceConnectionState(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) self.status = kwargs.get('status', None) self.description = kwargs.get('description', None) -class ResourceReference(Model): +class ResourceReference(msrest.serialization.Model): """A reference to an Azure resource. :param id: The fully qualified Azure resource id. @@ -2975,20 +3277,22 @@ class ResourceReference(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(ResourceReference, self).__init__(**kwargs) self.id = kwargs.get('id', None) -class RunCommandRequest(Model): +class RunCommandRequest(msrest.serialization.Model): """run command request. All required parameters must be populated in order to send to Azure. :param command: Required. command to run. :type command: str - :param context: base64 encoded zip file, contains files required by the - command + :param context: base64 encoded zip file, contains files required by the command. :type context: str :param cluster_token: AuthToken issued for AKS AAD Server App. :type cluster_token: str @@ -3004,29 +3308,31 @@ class RunCommandRequest(Model): 'cluster_token': {'key': 'clusterToken', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(RunCommandRequest, self).__init__(**kwargs) - self.command = kwargs.get('command', None) + self.command = kwargs['command'] self.context = kwargs.get('context', None) self.cluster_token = kwargs.get('cluster_token', None) -class RunCommandResult(Model): +class RunCommandResult(msrest.serialization.Model): """run command result. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: command id. :vartype id: str - :ivar provisioning_state: provisioning State + :ivar provisioning_state: provisioning State. :vartype provisioning_state: str - :ivar exit_code: exit code of the command + :ivar exit_code: exit code of the command. :vartype exit_code: int :ivar started_at: time when the command started. - :vartype started_at: datetime + :vartype started_at: ~datetime.datetime :ivar finished_at: time when the command finished. - :vartype finished_at: datetime + :vartype finished_at: ~datetime.datetime :ivar logs: command output. :vartype logs: str :ivar reason: explain why provisioningState is set to failed (if so). @@ -3053,7 +3359,10 @@ class RunCommandResult(Model): 'reason': {'key': 'properties.reason', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(RunCommandResult, self).__init__(**kwargs) self.id = None self.provisioning_state = None @@ -3064,13 +3373,12 @@ def __init__(self, **kwargs): self.reason = None -class SysctlConfig(Model): +class SysctlConfig(msrest.serialization.Model): """Sysctl settings for Linux agent nodes. :param net_core_somaxconn: Sysctl setting net.core.somaxconn. :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. + :param net_core_netdev_max_backlog: Sysctl setting net.core.netdev_max_backlog. :type net_core_netdev_max_backlog: int :param net_core_rmem_default: Sysctl setting net.core.rmem_default. :type net_core_rmem_default: int @@ -3082,45 +3390,33 @@ class SysctlConfig(Model): :type net_core_wmem_max: int :param net_core_optmem_max: Sysctl setting net.core.optmem_max. :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. + :param net_ipv4_tcp_max_syn_backlog: Sysctl setting net.ipv4.tcp_max_syn_backlog. :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. + :param net_ipv4_tcp_max_tw_buckets: Sysctl setting net.ipv4.tcp_max_tw_buckets. :type net_ipv4_tcp_max_tw_buckets: int :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. + :param net_ipv4_tcp_keepalive_time: Sysctl setting net.ipv4.tcp_keepalive_time. :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. + :param net_ipv4_tcp_keepalive_probes: Sysctl setting net.ipv4.tcp_keepalive_probes. :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. + :param net_ipv4_tcpkeepalive_intvl: Sysctl setting net.ipv4.tcp_keepalive_intvl. :type net_ipv4_tcpkeepalive_intvl: int :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. + :param net_ipv4_ip_local_port_range: Sysctl setting net.ipv4.ip_local_port_range. :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. + :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting net.ipv4.neigh.default.gc_thresh1. :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. + :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting net.ipv4.neigh.default.gc_thresh2. :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. + :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting net.ipv4.neigh.default.gc_thresh3. :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. + :param net_netfilter_nf_conntrack_max: Sysctl setting net.netfilter.nf_conntrack_max. :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. + :param net_netfilter_nf_conntrack_buckets: Sysctl setting net.netfilter.nf_conntrack_buckets. :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. + :param fs_inotify_max_user_watches: Sysctl setting fs.inotify.max_user_watches. :type fs_inotify_max_user_watches: int :param fs_file_max: Sysctl setting fs.file-max. :type fs_file_max: int @@ -3169,7 +3465,10 @@ class SysctlConfig(Model): 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SysctlConfig, self).__init__(**kwargs) self.net_core_somaxconn = kwargs.get('net_core_somaxconn', None) self.net_core_netdev_max_backlog = kwargs.get('net_core_netdev_max_backlog', None) @@ -3201,27 +3500,24 @@ def __init__(self, **kwargs): self.vm_vfs_cache_pressure = kwargs.get('vm_vfs_cache_pressure', None) -class SystemData(Model): +class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. :param created_by: The identity that created the resource. :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.CreatedByType + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.CreatedByType :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime + :type created_at: ~datetime.datetime :param last_modified_by: The identity that last modified the resource. :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". :type last_modified_by_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. - :type last_modified_at: datetime + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime """ _attribute_map = { @@ -3233,7 +3529,10 @@ class SystemData(Model): 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SystemData, self).__init__(**kwargs) self.created_by = kwargs.get('created_by', None) self.created_by_type = kwargs.get('created_by_type', None) @@ -3243,10 +3542,10 @@ def __init__(self, **kwargs): self.last_modified_at = kwargs.get('last_modified_at', None) -class TagsObject(Model): +class TagsObject(msrest.serialization.Model): """Tags object for patch operations. - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -3254,16 +3553,19 @@ class TagsObject(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(TagsObject, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) -class TimeInWeek(Model): +class TimeInWeek(msrest.serialization.Model): """Time in a week. - :param day: A day in a week. Possible values include: 'Sunday', 'Monday', - 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' + :param day: A day in a week. Possible values include: "Sunday", "Monday", "Tuesday", + "Wednesday", "Thursday", "Friday", "Saturday". :type day: str or ~azure.mgmt.containerservice.v2021_05_01.models.WeekDay :param hour_slots: hour slots in a day. :type hour_slots: list[int] @@ -3274,19 +3576,22 @@ class TimeInWeek(Model): 'hour_slots': {'key': 'hourSlots', 'type': '[int]'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(TimeInWeek, self).__init__(**kwargs) self.day = kwargs.get('day', None) self.hour_slots = kwargs.get('hour_slots', None) -class TimeSpan(Model): +class TimeSpan(msrest.serialization.Model): """The time span with start and end properties. - :param start: The start of a time span - :type start: datetime - :param end: The end of a time span - :type end: datetime + :param start: The start of a time span. + :type start: ~datetime.datetime + :param end: The end of a time span. + :type end: ~datetime.datetime """ _attribute_map = { @@ -3294,7 +3599,10 @@ class TimeSpan(Model): 'end': {'key': 'end', 'type': 'iso-8601'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(TimeSpan, self).__init__(**kwargs) self.start = kwargs.get('start', None) self.end = kwargs.get('end', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_models_py3.py old mode 100644 new mode 100755 index aeaae816e3e..db1b9190e9b --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_models_py3.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_models_py3.py @@ -1,30 +1,30 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError +import datetime +from typing import Dict, List, Optional, Union +import msrest.serialization -class SubResource(Model): +from ._container_service_client_enums import * + + +class SubResource(msrest.serialization.Model): """Reference to another subresource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str """ @@ -40,7 +40,10 @@ class SubResource(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(SubResource, self).__init__(**kwargs) self.id = None self.name = None @@ -50,139 +53,120 @@ def __init__(self, **kwargs) -> None: class AgentPool(SubResource): """Agent Pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 1000 (inclusive) for user pools and in - the range of 1 to 1000 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. :type count: int :param vm_size: Size of agent VMs. :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS", "Temporary". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param os_sku: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner + for Linux OSType. Not applicable to Windows OSType. Possible values include: "Ubuntu", + "CBLMariner". :type os_sku: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param agent_pool_type: AgentPoolType represents types of an agent pool. - Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type agent_pool_type: str or + :param type_properties_type: AgentPoolType represents types of an agent pool. Possible values + include: "VirtualMachineScaleSets", "AvailabilitySet". + :type type_properties_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_05_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. + :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs assigned from this + Public IP Prefix. :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool - :param enable_ultra_ssd: Whether to enable UltraSSD + :param enable_ultra_ssd: Whether to enable UltraSSD. :type enable_ultra_ssd: bool - :param enable_fips: Whether to use FIPS enabled OS + :param enable_fips: Whether to use FIPS enabled OS. :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' + :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. Possible + values include: "MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g". :type gpu_instance_profile: str or ~azure.mgmt.containerservice.v2021_05_01.models.GPUInstanceProfile """ @@ -191,6 +175,7 @@ class AgentPool(SubResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -213,7 +198,7 @@ class AgentPool(SubResource): 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, 'min_count': {'key': 'properties.minCount', 'type': 'int'}, 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, - 'agent_pool_type': {'key': 'properties.type', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, 'mode': {'key': 'properties.mode', 'type': 'str'}, 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, @@ -238,7 +223,44 @@ class AgentPool(SubResource): 'gpu_instance_profile': {'key': 'properties.gpuInstanceProfile', 'type': 'str'}, } - def __init__(self, *, count: int=None, vm_size: str=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", os_sku=None, max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, agent_pool_type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, node_public_ip_prefix_id: str=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, enable_ultra_ssd: bool=None, enable_fips: bool=None, gpu_instance_profile=None, **kwargs) -> None: + def __init__( + self, + *, + count: Optional[int] = None, + vm_size: Optional[str] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "KubeletDiskType"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + os_sku: Optional[Union[str, "OSSKU"]] = None, + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type_properties_type: Optional[Union[str, "AgentPoolType"]] = None, + mode: Optional[Union[str, "AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["AgentPoolUpgradeSettings"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + node_public_ip_prefix_id: Optional[str] = None, + scale_set_priority: Optional[Union[str, "ScaleSetPriority"]] = "Regular", + scale_set_eviction_policy: Optional[Union[str, "ScaleSetEvictionPolicy"]] = "Delete", + spot_max_price: Optional[float] = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["KubeletConfig"] = None, + linux_os_config: Optional["LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + enable_ultra_ssd: Optional[bool] = None, + enable_fips: Optional[bool] = None, + gpu_instance_profile: Optional[Union[str, "GPUInstanceProfile"]] = None, + **kwargs + ): super(AgentPool, self).__init__(**kwargs) self.count = count self.vm_size = vm_size @@ -253,7 +275,7 @@ def __init__(self, *, count: int=None, vm_size: str=None, os_disk_size_gb: int=N self.max_count = max_count self.min_count = min_count self.enable_auto_scaling = enable_auto_scaling - self.agent_pool_type = agent_pool_type + self.type_properties_type = type_properties_type self.mode = mode self.orchestrator_version = orchestrator_version self.node_image_version = None @@ -278,11 +300,10 @@ def __init__(self, *, count: int=None, vm_size: str=None, os_disk_size_gb: int=N self.gpu_instance_profile = gpu_instance_profile -class AgentPoolAvailableVersions(Model): +class AgentPoolAvailableVersions(msrest.serialization.Model): """The list of available versions for an agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Id of the agent pool available versions. :vartype id: str @@ -308,7 +329,12 @@ class AgentPoolAvailableVersions(Model): 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, } - def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: + def __init__( + self, + *, + agent_pool_versions: Optional[List["AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, + **kwargs + ): super(AgentPoolAvailableVersions, self).__init__(**kwargs) self.id = None self.name = None @@ -316,7 +342,7 @@ def __init__(self, *, agent_pool_versions=None, **kwargs) -> None: self.agent_pool_versions = agent_pool_versions -class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): +class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(msrest.serialization.Model): """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. :param default: Whether this version is the default agent pool version. @@ -333,18 +359,55 @@ class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, *, default: bool=None, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: + def __init__( + self, + *, + default: Optional[bool] = None, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) self.default = default self.kubernetes_version = kubernetes_version self.is_preview = is_preview -class AgentPoolUpgradeProfile(Model): +class AgentPoolListResult(msrest.serialization.Model): + """The response from the List Agent Pools operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of agent pools. + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool] + :ivar next_link: The URL to get the next set of agent pool results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AgentPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AgentPool"]] = None, + **kwargs + ): + super(AgentPoolListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class AgentPoolUpgradeProfile(msrest.serialization.Model): """The list of available upgrades for an agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -354,20 +417,16 @@ class AgentPoolUpgradeProfile(Model): :vartype name: str :ivar type: Type of the agent pool upgrade profile. :vartype type: str - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). :type kubernetes_version: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. :type upgrades: list[~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :param latest_node_image_version: LatestNodeImageVersion is the latest AKS - supported node image version. + :param latest_node_image_version: LatestNodeImageVersion is the latest AKS supported node image + version. :type latest_node_image_version: str """ @@ -389,7 +448,15 @@ class AgentPoolUpgradeProfile(Model): 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, } - def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, latest_node_image_version: str=None, **kwargs) -> None: + def __init__( + self, + *, + kubernetes_version: str, + os_type: Union[str, "OSType"] = "Linux", + upgrades: Optional[List["AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, + latest_node_image_version: Optional[str] = None, + **kwargs + ): super(AgentPoolUpgradeProfile, self).__init__(**kwargs) self.id = None self.name = None @@ -400,7 +467,7 @@ def __init__(self, *, kubernetes_version: str, os_type="Linux", upgrades=None, l self.latest_node_image_version = latest_node_image_version -class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): +class AgentPoolUpgradeProfilePropertiesUpgradesItem(msrest.serialization.Model): """AgentPoolUpgradeProfilePropertiesUpgradesItem. :param kubernetes_version: Kubernetes version (major, minor, patch). @@ -414,17 +481,23 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: + def __init__( + self, + *, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) self.kubernetes_version = kubernetes_version self.is_preview = is_preview -class AgentPoolUpgradeSettings(Model): +class AgentPoolUpgradeSettings(msrest.serialization.Model): """Settings for upgrading an agentpool. - :param max_surge: Count or percentage of additional nodes to be added - during upgrade. If empty uses AKS default + :param max_surge: Count or percentage of additional nodes to be added during upgrade. If empty + uses AKS default. :type max_surge: str """ @@ -432,55 +505,51 @@ class AgentPoolUpgradeSettings(Model): 'max_surge': {'key': 'maxSurge', 'type': 'str'}, } - def __init__(self, *, max_surge: str=None, **kwargs) -> None: + def __init__( + self, + *, + max_surge: Optional[str] = None, + **kwargs + ): super(AgentPoolUpgradeSettings, self).__init__(**kwargs) self.max_surge = max_surge -class CloudError(Model): +class CloudError(msrest.serialization.Model): """An error response from the Container service. :param error: Details about the error. - :type error: - ~azure.mgmt.containerservice.v2021_05_01.models.CloudErrorBody + :type error: ~azure.mgmt.containerservice.v2021_05_01.models.CloudErrorBody """ _attribute_map = { 'error': {'key': 'error', 'type': 'CloudErrorBody'}, } - def __init__(self, *, error=None, **kwargs) -> None: + def __init__( + self, + *, + error: Optional["CloudErrorBody"] = None, + **kwargs + ): super(CloudError, self).__init__(**kwargs) self.error = error -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - - -class CloudErrorBody(Model): +class CloudErrorBody(msrest.serialization.Model): """An error response from the Container service. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: A message describing the error, intended to be suitable for display in a user + interface. :type message: str - :param target: The target of the particular error. For example, the name - of the property in error. + :param target: The target of the particular error. For example, the name of the property in + error. :type target: str :param details: A list of additional details about the error. - :type details: - list[~azure.mgmt.containerservice.v2021_05_01.models.CloudErrorBody] + :type details: list[~azure.mgmt.containerservice.v2021_05_01.models.CloudErrorBody] """ _attribute_map = { @@ -490,7 +559,15 @@ class CloudErrorBody(Model): 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, } - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["CloudErrorBody"]] = None, + **kwargs + ): super(CloudErrorBody, self).__init__(**kwargs) self.code = code self.message = message @@ -498,13 +575,287 @@ def __init__(self, *, code: str=None, message: str=None, target: str=None, detai self.details = details -class ContainerServiceDiagnosticsProfile(Model): +class Components1Q1Og48SchemasManagedclusterAllof1(msrest.serialization.Model): + """Components1Q1Og48SchemasManagedclusterAllof1. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. + :type kubernetes_version: str + :param dns_prefix: DNS prefix specified when creating the managed cluster. + :type dns_prefix: str + :param fqdn_subdomain: FQDN subdomain specified when creating private cluster with custom + private dns zone. + :type fqdn_subdomain: str + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + :ivar private_fqdn: FQDN of private cluster. + :vartype private_fqdn: str + :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy config. + :vartype azure_portal_fqdn: str + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAgentPoolProfile] + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceLinuxProfile + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterWindowsProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterServicePrincipalProfile + :param addon_profiles: Profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAddonProfile] + :param pod_identity_profile: Profile of managed cluster pod identity. + :type pod_identity_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentityProfile + :param node_resource_group: Name of the resource group containing agent pool nodes. + :type node_resource_group: str + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :type enable_rbac: bool + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. + :type enable_pod_security_policy: bool + :param network_profile: Profile of network configuration. + :type network_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceNetworkProfile + :param aad_profile: Profile of Azure Active Directory configuration. + :type aad_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile + :param auto_upgrade_profile: Profile of auto upgrade configuration. + :type auto_upgrade_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAutoUpgradeProfile + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. + :type auto_scaler_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPropertiesAutoScalerProfile + :param api_server_access_profile: Access profile for managed cluster API server. + :type api_server_access_profile: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAPIServerAccessProfile + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. + :type disk_encryption_set_id: str + :param identity_profile: Identities associated with the cluster. + :type identity_profile: dict[str, + ~azure.mgmt.containerservice.v2021_05_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + :param private_link_resources: Private link resources associated with the cluster. + :type private_link_resources: + list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource] + :param disable_local_accounts: If set to true, getting static credential will be disabled for + this cluster. Expected to only be used for AAD clusters. + :type disable_local_accounts: bool + :param http_proxy_config: Configurations for provisioning the cluster with HTTP proxy servers. + :type http_proxy_config: + ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterHTTPProxyConfig + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + 'max_agent_pools': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'private_fqdn': {'readonly': True}, + 'azure_portal_fqdn': {'readonly': True}, + } + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, + 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn_subdomain': {'key': 'properties.fqdnSubdomain', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, + 'azure_portal_fqdn': {'key': 'properties.azurePortalFQDN', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, + 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, + 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, + 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, + 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, + 'private_link_resources': {'key': 'properties.privateLinkResources', 'type': '[PrivateLinkResource]'}, + 'disable_local_accounts': {'key': 'properties.disableLocalAccounts', 'type': 'bool'}, + 'http_proxy_config': {'key': 'properties.httpProxyConfig', 'type': 'ManagedClusterHTTPProxyConfig'}, + } + + def __init__( + self, + *, + identity: Optional["ManagedClusterIdentity"] = None, + kubernetes_version: Optional[str] = None, + dns_prefix: Optional[str] = None, + fqdn_subdomain: Optional[str] = None, + agent_pool_profiles: Optional[List["ManagedClusterAgentPoolProfile"]] = None, + linux_profile: Optional["ContainerServiceLinuxProfile"] = None, + windows_profile: Optional["ManagedClusterWindowsProfile"] = None, + service_principal_profile: Optional["ManagedClusterServicePrincipalProfile"] = None, + addon_profiles: Optional[Dict[str, "ManagedClusterAddonProfile"]] = None, + pod_identity_profile: Optional["ManagedClusterPodIdentityProfile"] = None, + node_resource_group: Optional[str] = None, + enable_rbac: Optional[bool] = None, + enable_pod_security_policy: Optional[bool] = None, + network_profile: Optional["ContainerServiceNetworkProfile"] = None, + aad_profile: Optional["ManagedClusterAADProfile"] = None, + auto_upgrade_profile: Optional["ManagedClusterAutoUpgradeProfile"] = None, + auto_scaler_profile: Optional["ManagedClusterPropertiesAutoScalerProfile"] = None, + api_server_access_profile: Optional["ManagedClusterAPIServerAccessProfile"] = None, + disk_encryption_set_id: Optional[str] = None, + identity_profile: Optional[Dict[str, "ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties"]] = None, + private_link_resources: Optional[List["PrivateLinkResource"]] = None, + disable_local_accounts: Optional[bool] = None, + http_proxy_config: Optional["ManagedClusterHTTPProxyConfig"] = None, + **kwargs + ): + super(Components1Q1Og48SchemasManagedclusterAllof1, self).__init__(**kwargs) + self.identity = identity + self.provisioning_state = None + self.power_state = None + self.max_agent_pools = None + self.kubernetes_version = kubernetes_version + self.dns_prefix = dns_prefix + self.fqdn_subdomain = fqdn_subdomain + self.fqdn = None + self.private_fqdn = None + self.azure_portal_fqdn = None + self.agent_pool_profiles = agent_pool_profiles + self.linux_profile = linux_profile + self.windows_profile = windows_profile + self.service_principal_profile = service_principal_profile + self.addon_profiles = addon_profiles + self.pod_identity_profile = pod_identity_profile + self.node_resource_group = node_resource_group + self.enable_rbac = enable_rbac + self.enable_pod_security_policy = enable_pod_security_policy + self.network_profile = network_profile + self.aad_profile = aad_profile + self.auto_upgrade_profile = auto_upgrade_profile + self.auto_scaler_profile = auto_scaler_profile + self.api_server_access_profile = api_server_access_profile + self.disk_encryption_set_id = disk_encryption_set_id + self.identity_profile = identity_profile + self.private_link_resources = private_link_resources + self.disable_local_accounts = disable_local_accounts + self.http_proxy_config = http_proxy_config + + +class Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedIdentity(msrest.serialization.Model): + """UserAssignedIdentity. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.resource_id = resource_id + self.client_id = client_id + self.object_id = object_id + + +class ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties(UserAssignedIdentity): + """ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs + ): + super(ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): """Profile for diagnostics on the container service cluster. All required parameters must be populated in order to send to Azure. - :param vm_diagnostics: Required. Profile for diagnostics on the container - service VMs. + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. :type vm_diagnostics: ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceVMDiagnostics """ @@ -517,23 +868,25 @@ class ContainerServiceDiagnosticsProfile(Model): 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, } - def __init__(self, *, vm_diagnostics, **kwargs) -> None: + def __init__( + self, + *, + vm_diagnostics: "ContainerServiceVMDiagnostics", + **kwargs + ): super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) self.vm_diagnostics = vm_diagnostics -class ContainerServiceLinuxProfile(Model): +class ContainerServiceLinuxProfile(msrest.serialization.Model): """Profile for Linux VMs in the container service cluster. All required parameters must be populated in order to send to Azure. - :param admin_username: Required. The administrator username to use for - Linux VMs. + :param admin_username: Required. The administrator username to use for Linux VMs. :type admin_username: str - :param ssh: Required. SSH configuration for Linux-based VMs running on - Azure. - :type ssh: - ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceSshConfiguration + :param ssh: Required. SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceSshConfiguration """ _validation = { @@ -546,93 +899,82 @@ class ContainerServiceLinuxProfile(Model): 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, } - def __init__(self, *, admin_username: str, ssh, **kwargs) -> None: + def __init__( + self, + *, + admin_username: str, + ssh: "ContainerServiceSshConfiguration", + **kwargs + ): super(ContainerServiceLinuxProfile, self).__init__(**kwargs) self.admin_username = admin_username self.ssh = ssh -class ContainerServiceMasterProfile(Model): +class ContainerServiceMasterProfile(msrest.serialization.Model): """Profile for the container service master. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param count: Number of masters (VMs) in the container service cluster. - Allowed values are 1, 3, and 5. The default value is 1. Default value: 1 . - :type count: int - :param dns_prefix: Required. DNS prefix to be used to create the FQDN for - the master pool. + :param count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2021_05_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. :type dns_prefix: str - :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', - 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', 'Standard_A5', - 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A8_v2', - 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', 'Standard_B2s', - 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D11', - 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', - 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', - 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', - 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', - 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', - 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', - 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', - 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', - 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', - 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', - 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', - 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', - 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', - 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', - 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', - 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', - 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', - 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', - 'Standard_DS3', 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', - 'Standard_DS4', 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', - 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', 'Standard_E16_v3', - 'Standard_E16s_v3', 'Standard_E2_v3', 'Standard_E2s_v3', - 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', 'Standard_E32_v3', - 'Standard_E32s_v3', 'Standard_E4_v3', 'Standard_E4s_v3', - 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', 'Standard_E64_v3', - 'Standard_E64s_v3', 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', - 'Standard_F16', 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', - 'Standard_F2', 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', - 'Standard_F4', 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', - 'Standard_F72s_v2', 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', - 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', - 'Standard_GS4-4', 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', - 'Standard_GS5-8', 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', - 'Standard_H16r', 'Standard_H8', 'Standard_H8m', 'Standard_L16s', - 'Standard_L32s', 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', - 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', - 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', - 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', - 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', - 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', - 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', - 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". :type vm_size: str or ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceVMSizeTypes - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier. + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. :type vnet_subnet_id: str - :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to - specify the first static ip of masters. Default value: "10.240.255.5" . + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. :type first_consecutive_static_ip: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". :type storage_profile: str or ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceStorageProfileTypes :ivar fqdn: FQDN for the master pool. @@ -642,6 +984,7 @@ class ContainerServiceMasterProfile(Model): _validation = { 'dns_prefix': {'required': True}, 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, 'fqdn': {'readonly': True}, } @@ -656,7 +999,18 @@ class ContainerServiceMasterProfile(Model): 'fqdn': {'key': 'fqdn', 'type': 'str'}, } - def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, first_consecutive_static_ip: str="10.240.255.5", storage_profile=None, **kwargs) -> None: + def __init__( + self, + *, + dns_prefix: str, + vm_size: Union[str, "ContainerServiceVMSizeTypes"], + count: Optional[Union[int, "Count"]] = "1", + os_disk_size_gb: Optional[int] = None, + vnet_subnet_id: Optional[str] = None, + first_consecutive_static_ip: Optional[str] = "10.240.255.5", + storage_profile: Optional[Union[str, "ContainerServiceStorageProfileTypes"]] = None, + **kwargs + ): super(ContainerServiceMasterProfile, self).__init__(**kwargs) self.count = count self.dns_prefix = dns_prefix @@ -668,46 +1022,35 @@ def __init__(self, *, dns_prefix: str, vm_size, count: int=1, os_disk_size_gb: i self.fqdn = None -class ContainerServiceNetworkProfile(Model): +class ContainerServiceNetworkProfile(msrest.serialization.Model): """Profile of network configuration. - :param network_plugin: Network plugin used for building Kubernetes - network. Possible values include: 'azure', 'kubenet'. Default value: - "kubenet" . - :type network_plugin: str or - ~azure.mgmt.containerservice.v2021_05_01.models.NetworkPlugin - :param network_policy: Network policy used for building Kubernetes - network. Possible values include: 'calico', 'azure' - :type network_policy: str or - ~azure.mgmt.containerservice.v2021_05_01.models.NetworkPolicy - :param network_mode: Network mode used for building Kubernetes network. - Possible values include: 'transparent', 'bridge' - :type network_mode: str or - ~azure.mgmt.containerservice.v2021_05_01.models.NetworkMode - :param pod_cidr: A CIDR notation IP range from which to assign pod IPs - when kubenet is used. Default value: "10.244.0.0/16" . + :param network_plugin: Network plugin used for building Kubernetes network. Possible values + include: "azure", "kubenet". Default value: "kubenet". + :type network_plugin: str or ~azure.mgmt.containerservice.v2021_05_01.models.NetworkPlugin + :param network_policy: Network policy used for building Kubernetes network. Possible values + include: "calico", "azure". + :type network_policy: str or ~azure.mgmt.containerservice.v2021_05_01.models.NetworkPolicy + :param network_mode: Network mode used for building Kubernetes network. Possible values + include: "transparent", "bridge". + :type network_mode: str or ~azure.mgmt.containerservice.v2021_05_01.models.NetworkMode + :param pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. :type pod_cidr: str - :param service_cidr: A CIDR notation IP range from which to assign service - cluster IPs. It must not overlap with any Subnet IP ranges. Default value: - "10.0.0.0/16" . + :param service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. :type service_cidr: str - :param dns_service_ip: An IP address assigned to the Kubernetes DNS - service. It must be within the Kubernetes service address range specified - in serviceCidr. Default value: "10.0.0.10" . + :param dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. :type dns_service_ip: str - :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker - bridge network. It must not overlap with any Subnet IP ranges or the - Kubernetes service address range. Default value: "172.17.0.1/16" . + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. :type docker_bridge_cidr: str - :param outbound_type: The outbound (egress) routing method. Possible - values include: 'loadBalancer', 'userDefinedRouting'. Default value: - "loadBalancer" . - :type outbound_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OutboundType - :param load_balancer_sku: The load balancer sku for the managed cluster. - Possible values include: 'standard', 'basic' - :type load_balancer_sku: str or - ~azure.mgmt.containerservice.v2021_05_01.models.LoadBalancerSku + :param outbound_type: The outbound (egress) routing method. Possible values include: + "loadBalancer", "userDefinedRouting". Default value: "loadBalancer". + :type outbound_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OutboundType + :param load_balancer_sku: The load balancer sku for the managed cluster. Possible values + include: "standard", "basic". + :type load_balancer_sku: str or ~azure.mgmt.containerservice.v2021_05_01.models.LoadBalancerSku :param load_balancer_profile: Profile of the cluster load balancer. :type load_balancer_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterLoadBalancerProfile @@ -733,7 +1076,21 @@ class ContainerServiceNetworkProfile(Model): 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, } - def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mode=None, pod_cidr: str="10.244.0.0/16", service_cidr: str="10.0.0.0/16", dns_service_ip: str="10.0.0.10", docker_bridge_cidr: str="172.17.0.1/16", outbound_type="loadBalancer", load_balancer_sku=None, load_balancer_profile=None, **kwargs) -> None: + def __init__( + self, + *, + network_plugin: Optional[Union[str, "NetworkPlugin"]] = "kubenet", + network_policy: Optional[Union[str, "NetworkPolicy"]] = None, + network_mode: Optional[Union[str, "NetworkMode"]] = None, + pod_cidr: Optional[str] = "10.244.0.0/16", + service_cidr: Optional[str] = "10.0.0.0/16", + dns_service_ip: Optional[str] = "10.0.0.10", + docker_bridge_cidr: Optional[str] = "172.17.0.1/16", + outbound_type: Optional[Union[str, "OutboundType"]] = "loadBalancer", + load_balancer_sku: Optional[Union[str, "LoadBalancerSku"]] = None, + load_balancer_profile: Optional["ManagedClusterLoadBalancerProfile"] = None, + **kwargs + ): super(ContainerServiceNetworkProfile, self).__init__(**kwargs) self.network_plugin = network_plugin self.network_policy = network_policy @@ -747,13 +1104,13 @@ def __init__(self, *, network_plugin="kubenet", network_policy=None, network_mod self.load_balancer_profile = load_balancer_profile -class ContainerServiceSshConfiguration(Model): +class ContainerServiceSshConfiguration(msrest.serialization.Model): """SSH configuration for Linux-based VMs running on Azure. All required parameters must be populated in order to send to Azure. - :param public_keys: Required. The list of SSH public keys used to - authenticate with Linux-based VMs. Only expect one key specified. + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. Only expect one key specified. :type public_keys: list[~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceSshPublicKey] """ @@ -766,19 +1123,23 @@ class ContainerServiceSshConfiguration(Model): 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, } - def __init__(self, *, public_keys, **kwargs) -> None: + def __init__( + self, + *, + public_keys: List["ContainerServiceSshPublicKey"], + **kwargs + ): super(ContainerServiceSshConfiguration, self).__init__(**kwargs) self.public_keys = public_keys -class ContainerServiceSshPublicKey(Model): +class ContainerServiceSshPublicKey(msrest.serialization.Model): """Contains information about SSH certificate public key data. All required parameters must be populated in order to send to Azure. - :param key_data: Required. Certificate public key used to authenticate - with VMs through SSH. The certificate must be in PEM format with or - without headers. + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. :type key_data: str """ @@ -790,24 +1151,26 @@ class ContainerServiceSshPublicKey(Model): 'key_data': {'key': 'keyData', 'type': 'str'}, } - def __init__(self, *, key_data: str, **kwargs) -> None: + def __init__( + self, + *, + key_data: str, + **kwargs + ): super(ContainerServiceSshPublicKey, self).__init__(**kwargs) self.key_data = key_data -class ContainerServiceVMDiagnostics(Model): +class ContainerServiceVMDiagnostics(msrest.serialization.Model): """Profile for diagnostics on the container service VMs. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param enabled: Required. Whether the VM diagnostic agent is provisioned - on the VM. + :param enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. :type enabled: bool - :ivar storage_uri: The URI of the storage account where diagnostics are - stored. + :ivar storage_uri: The URI of the storage account where diagnostics are stored. :vartype storage_uri: str """ @@ -821,17 +1184,21 @@ class ContainerServiceVMDiagnostics(Model): 'storage_uri': {'key': 'storageUri', 'type': 'str'}, } - def __init__(self, *, enabled: bool, **kwargs) -> None: + def __init__( + self, + *, + enabled: bool, + **kwargs + ): super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) self.enabled = enabled self.storage_uri = None -class CredentialResult(Model): +class CredentialResult(msrest.serialization.Model): """The credential result response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar name: The name of the credential. :vartype name: str @@ -849,21 +1216,22 @@ class CredentialResult(Model): 'value': {'key': 'value', 'type': 'bytearray'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(CredentialResult, self).__init__(**kwargs) self.name = None self.value = None -class CredentialResults(Model): +class CredentialResults(msrest.serialization.Model): """The list of credential result response. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2021_05_01.models.CredentialResult] + :vartype kubeconfigs: list[~azure.mgmt.containerservice.v2021_05_01.models.CredentialResult] """ _validation = { @@ -874,20 +1242,21 @@ class CredentialResults(Model): 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(CredentialResults, self).__init__(**kwargs) self.kubeconfigs = None -class EndpointDependency(Model): +class EndpointDependency(msrest.serialization.Model): """A domain name that AKS agent nodes are reaching at. :param domain_name: The domain name of the dependency. :type domain_name: str - :param endpoint_details: The Ports and Protocols used when connecting to - domainName. - :type endpoint_details: - list[~azure.mgmt.containerservice.v2021_05_01.models.EndpointDetail] + :param endpoint_details: The Ports and Protocols used when connecting to domainName. + :type endpoint_details: list[~azure.mgmt.containerservice.v2021_05_01.models.EndpointDetail] """ _attribute_map = { @@ -895,22 +1264,28 @@ class EndpointDependency(Model): 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, } - def __init__(self, *, domain_name: str=None, endpoint_details=None, **kwargs) -> None: + def __init__( + self, + *, + domain_name: Optional[str] = None, + endpoint_details: Optional[List["EndpointDetail"]] = None, + **kwargs + ): super(EndpointDependency, self).__init__(**kwargs) self.domain_name = domain_name self.endpoint_details = endpoint_details -class EndpointDetail(Model): +class EndpointDetail(msrest.serialization.Model): """connect information from the AKS agent nodes to a single endpoint. :param ip_address: An IP Address that Domain Name currently resolves to. :type ip_address: str :param port: The port an endpoint is connected to. :type port: int - :param protocol: The protocol used for connection + :param protocol: The protocol used for connection. :type protocol: str - :param description: Description of the detail + :param description: Description of the detail. :type description: str """ @@ -921,7 +1296,15 @@ class EndpointDetail(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, *, ip_address: str=None, port: int=None, protocol: str=None, description: str=None, **kwargs) -> None: + def __init__( + self, + *, + ip_address: Optional[str] = None, + port: Optional[int] = None, + protocol: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): super(EndpointDetail, self).__init__(**kwargs) self.ip_address = ip_address self.port = port @@ -929,15 +1312,13 @@ def __init__(self, *, ip_address: str=None, port: int=None, protocol: str=None, self.description = description -class ExtendedLocation(Model): +class ExtendedLocation(msrest.serialization.Model): """The complex type of the extended location. :param name: The name of the extended location. :type name: str - :param type: The type of the extended location. Possible values include: - 'EdgeZone' - :type type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ExtendedLocationTypes + :param type: The type of the extended location. Possible values include: "EdgeZone". + :type type: str or ~azure.mgmt.containerservice.v2021_05_01.models.ExtendedLocationTypes """ _attribute_map = { @@ -945,41 +1326,46 @@ class ExtendedLocation(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, name: str=None, type=None, **kwargs) -> None: + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[Union[str, "ExtendedLocationTypes"]] = None, + **kwargs + ): super(ExtendedLocation, self).__init__(**kwargs) self.name = name self.type = type -class KubeletConfig(Model): +class KubeletConfig(msrest.serialization.Model): """Kubelet configurations of agent nodes. :param cpu_manager_policy: CPU Manager policy to use. :type cpu_manager_policy: str - :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that - specify CPU limits. + :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that specify CPU limits. :type cpu_cfs_quota: bool :param cpu_cfs_quota_period: Sets CPU CFS quota period value. :type cpu_cfs_quota_period: str - :param image_gc_high_threshold: The percent of disk usage after which - image garbage collection is always run. + :param image_gc_high_threshold: The percent of disk usage after which image garbage collection + is always run. :type image_gc_high_threshold: int - :param image_gc_low_threshold: The percent of disk usage before which - image garbage collection is never run. + :param image_gc_low_threshold: The percent of disk usage before which image garbage collection + is never run. :type image_gc_low_threshold: int :param topology_manager_policy: Topology Manager policy to use. :type topology_manager_policy: str - :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe - sysctl patterns (ending in `*`). + :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe sysctl patterns (ending in + ``*``\ ). :type allowed_unsafe_sysctls: list[str] - :param fail_swap_on: If set to true it will make the Kubelet fail to start - if swap is enabled on the node. + :param fail_swap_on: If set to true it will make the Kubelet fail to start if swap is enabled + on the node. :type fail_swap_on: bool - :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of - container log file before it is rotated. + :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of container log file before it + is rotated. :type container_log_max_size_mb: int - :param container_log_max_files: The maximum number of container log files - that can be present for a container. The number must be ≥ 2. + :param container_log_max_files: The maximum number of container log files that can be present + for a container. The number must be ≥ 2. :type container_log_max_files: int :param pod_max_pids: The maximum number of processes per pod. :type pod_max_pids: int @@ -1003,7 +1389,22 @@ class KubeletConfig(Model): 'pod_max_pids': {'key': 'podMaxPids', 'type': 'int'}, } - def __init__(self, *, cpu_manager_policy: str=None, cpu_cfs_quota: bool=None, cpu_cfs_quota_period: str=None, image_gc_high_threshold: int=None, image_gc_low_threshold: int=None, topology_manager_policy: str=None, allowed_unsafe_sysctls=None, fail_swap_on: bool=None, container_log_max_size_mb: int=None, container_log_max_files: int=None, pod_max_pids: int=None, **kwargs) -> None: + def __init__( + self, + *, + cpu_manager_policy: Optional[str] = None, + cpu_cfs_quota: Optional[bool] = None, + cpu_cfs_quota_period: Optional[str] = None, + image_gc_high_threshold: Optional[int] = None, + image_gc_low_threshold: Optional[int] = None, + topology_manager_policy: Optional[str] = None, + allowed_unsafe_sysctls: Optional[List[str]] = None, + fail_swap_on: Optional[bool] = None, + container_log_max_size_mb: Optional[int] = None, + container_log_max_files: Optional[int] = None, + pod_max_pids: Optional[int] = None, + **kwargs + ): super(KubeletConfig, self).__init__(**kwargs) self.cpu_manager_policy = cpu_manager_policy self.cpu_cfs_quota = cpu_cfs_quota @@ -1018,20 +1419,17 @@ def __init__(self, *, cpu_manager_policy: str=None, cpu_cfs_quota: bool=None, cp self.pod_max_pids = pod_max_pids -class LinuxOSConfig(Model): +class LinuxOSConfig(msrest.serialization.Model): """OS configurations of Linux agent nodes. :param sysctls: Sysctl settings for Linux agent nodes. - :type sysctls: - ~azure.mgmt.containerservice.v2021_05_01.models.SysctlConfig - :param transparent_huge_page_enabled: Transparent Huge Page enabled - configuration. + :type sysctls: ~azure.mgmt.containerservice.v2021_05_01.models.SysctlConfig + :param transparent_huge_page_enabled: Transparent Huge Page enabled configuration. :type transparent_huge_page_enabled: str - :param transparent_huge_page_defrag: Transparent Huge Page defrag - configuration. + :param transparent_huge_page_defrag: Transparent Huge Page defrag configuration. :type transparent_huge_page_defrag: str - :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap - file will be created on each node. + :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap file will be created on + each node. :type swap_file_size_mb: int """ @@ -1042,7 +1440,15 @@ class LinuxOSConfig(Model): 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, } - def __init__(self, *, sysctls=None, transparent_huge_page_enabled: str=None, transparent_huge_page_defrag: str=None, swap_file_size_mb: int=None, **kwargs) -> None: + def __init__( + self, + *, + sysctls: Optional["SysctlConfig"] = None, + transparent_huge_page_enabled: Optional[str] = None, + transparent_huge_page_defrag: Optional[str] = None, + swap_file_size_mb: Optional[int] = None, + **kwargs + ): super(LinuxOSConfig, self).__init__(**kwargs) self.sysctls = sysctls self.transparent_huge_page_enabled = transparent_huge_page_enabled @@ -1053,25 +1459,21 @@ def __init__(self, *, sysctls=None, transparent_huge_page_enabled: str=None, tra class MaintenanceConfiguration(SubResource): """maintenance configuration. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource ID. :vartype id: str - :ivar name: The name of the resource that is unique within a resource - group. This name can be used to access the resource. + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str :ivar system_data: The system meta data relating to this resource. - :vartype system_data: - ~azure.mgmt.containerservice.v2021_05_01.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2021_05_01.models.SystemData :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2021_05_01.models.TimeInWeek] + :type time_in_week: list[~azure.mgmt.containerservice.v2021_05_01.models.TimeInWeek] :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2021_05_01.models.TimeSpan] + :type not_allowed_time: list[~azure.mgmt.containerservice.v2021_05_01.models.TimeSpan] """ _validation = { @@ -1090,30 +1492,66 @@ class MaintenanceConfiguration(SubResource): 'not_allowed_time': {'key': 'properties.notAllowedTime', 'type': '[TimeSpan]'}, } - def __init__(self, *, time_in_week=None, not_allowed_time=None, **kwargs) -> None: + def __init__( + self, + *, + time_in_week: Optional[List["TimeInWeek"]] = None, + not_allowed_time: Optional[List["TimeSpan"]] = None, + **kwargs + ): super(MaintenanceConfiguration, self).__init__(**kwargs) self.system_data = None self.time_in_week = time_in_week self.not_allowed_time = not_allowed_time -class Resource(Model): +class MaintenanceConfigurationListResult(msrest.serialization.Model): + """The response from the List maintenance configurations operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of maintenance configurations. + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration] + :ivar next_link: The URL to get the next set of maintenance configuration results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MaintenanceConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["MaintenanceConfiguration"]] = None, + **kwargs + ): + super(MaintenanceConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class Resource(msrest.serialization.Model): """The Resource model definition. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id + :ivar id: Resource Id. :vartype id: str - :ivar name: Resource name + :ivar name: Resource name. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param location: Required. Resource location + :param location: Required. Resource location. :type location: str - :param tags: Resource tags + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -1132,7 +1570,13 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, location: str, tags=None, **kwargs) -> None: + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): super(Resource, self).__init__(**kwargs) self.id = None self.name = None @@ -1141,61 +1585,46 @@ def __init__(self, *, location: str, tags=None, **kwargs) -> None: self.tags = tags -class ManagedCluster(Resource): +class ManagedCluster(Resource, Components1Q1Og48SchemasManagedclusterAllof1): """Managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Represents the Power State of the cluster - :vartype power_state: - ~azure.mgmt.containerservice.v2021_05_01.models.PowerState - :ivar max_agent_pools: The max number of agent pools for the managed - cluster. + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. :vartype max_agent_pools: int - :param kubernetes_version: Version of Kubernetes specified when creating - the managed cluster. + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. :type kubernetes_version: str :param dns_prefix: DNS prefix specified when creating the managed cluster. :type dns_prefix: str - :param fqdn_subdomain: FQDN subdomain specified when creating private - cluster with custom private dns zone. + :param fqdn_subdomain: FQDN subdomain specified when creating private cluster with custom + private dns zone. :type fqdn_subdomain: str :ivar fqdn: FQDN for the master pool. :vartype fqdn: str :ivar private_fqdn: FQDN of private cluster. :vartype private_fqdn: str - :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy - config. + :ivar azure_portal_fqdn: FQDN for the master pool which used by proxy config. :vartype azure_portal_fqdn: str :param agent_pool_profiles: Properties of the agent pool. :type agent_pool_profiles: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAgentPoolProfile] - :param linux_profile: Profile for Linux VMs in the container service - cluster. + :param linux_profile: Profile for Linux VMs in the container service cluster. :type linux_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceLinuxProfile - :param windows_profile: Profile for Windows VMs in the container service - cluster. + :param windows_profile: Profile for Windows VMs in the container service cluster. :type windows_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterWindowsProfile - :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. :type service_principal_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterServicePrincipalProfile :param addon_profiles: Profile of managed cluster add-on. @@ -1204,81 +1633,74 @@ class ManagedCluster(Resource): :param pod_identity_profile: Profile of managed cluster pod identity. :type pod_identity_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentityProfile - :param node_resource_group: Name of the resource group containing agent - pool nodes. + :param node_resource_group: Name of the resource group containing agent pool nodes. :type node_resource_group: str - :param enable_rbac: Whether to enable Kubernetes Role-Based Access - Control. + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. :type enable_rbac: bool - :param enable_pod_security_policy: (DEPRECATING) Whether to enable - Kubernetes pod security policy (preview). This feature is set for removal - on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. :type enable_pod_security_policy: bool :param network_profile: Profile of network configuration. :type network_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ContainerServiceNetworkProfile :param aad_profile: Profile of Azure Active Directory configuration. - :type aad_profile: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile + :type aad_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile :param auto_upgrade_profile: Profile of auto upgrade configuration. :type auto_upgrade_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAutoUpgradeProfile - :param auto_scaler_profile: Parameters to be applied to the - cluster-autoscaler when enabled + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. :type auto_scaler_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPropertiesAutoScalerProfile - :param api_server_access_profile: Access profile for managed cluster API - server. + :param api_server_access_profile: Access profile for managed cluster API server. :type api_server_access_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAPIServerAccessProfile - :param disk_encryption_set_id: ResourceId of the disk encryption set to - use for enabling encryption at rest. + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. :type disk_encryption_set_id: str :param identity_profile: Identities associated with the cluster. :type identity_profile: dict[str, - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPropertiesIdentityProfileValue] - :param private_link_resources: Private link resources associated with the - cluster. + ~azure.mgmt.containerservice.v2021_05_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + :param private_link_resources: Private link resources associated with the cluster. :type private_link_resources: list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource] - :param disable_local_accounts: If set to true, getting static credential - will be disabled for this cluster. Expected to only be used for AAD - clusters. + :param disable_local_accounts: If set to true, getting static credential will be disabled for + this cluster. Expected to only be used for AAD clusters. :type disable_local_accounts: bool - :param http_proxy_config: Configurations for provisioning the cluster with - HTTP proxy servers. + :param http_proxy_config: Configurations for provisioning the cluster with HTTP proxy servers. :type http_proxy_config: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterHTTPProxyConfig - :param identity: The identity of the managed cluster, if configured. - :type identity: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterIdentity + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] :param sku: The managed cluster SKU. - :type sku: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKU + :type sku: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKU :param extended_location: The extended location of the Virtual Machine. - :type extended_location: - ~azure.mgmt.containerservice.v2021_05_01.models.ExtendedLocation + :type extended_location: ~azure.mgmt.containerservice.v2021_05_01.models.ExtendedLocation """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, 'max_agent_pools': {'readonly': True}, 'fqdn': {'readonly': True}, 'private_fqdn': {'readonly': True}, 'azure_portal_fqdn': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, @@ -1303,17 +1725,53 @@ class ManagedCluster(Resource): 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, - 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ManagedClusterPropertiesIdentityProfileValue}'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, 'private_link_resources': {'key': 'properties.privateLinkResources', 'type': '[PrivateLinkResource]'}, 'disable_local_accounts': {'key': 'properties.disableLocalAccounts', 'type': 'bool'}, 'http_proxy_config': {'key': 'properties.httpProxyConfig', 'type': 'ManagedClusterHTTPProxyConfig'}, - 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, } - def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dns_prefix: str=None, fqdn_subdomain: str=None, agent_pool_profiles=None, linux_profile=None, windows_profile=None, service_principal_profile=None, addon_profiles=None, pod_identity_profile=None, node_resource_group: str=None, enable_rbac: bool=None, enable_pod_security_policy: bool=None, network_profile=None, aad_profile=None, auto_upgrade_profile=None, auto_scaler_profile=None, api_server_access_profile=None, disk_encryption_set_id: str=None, identity_profile=None, private_link_resources=None, disable_local_accounts: bool=None, http_proxy_config=None, identity=None, sku=None, extended_location=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) + def __init__( + self, + *, + location: str, + identity: Optional["ManagedClusterIdentity"] = None, + kubernetes_version: Optional[str] = None, + dns_prefix: Optional[str] = None, + fqdn_subdomain: Optional[str] = None, + agent_pool_profiles: Optional[List["ManagedClusterAgentPoolProfile"]] = None, + linux_profile: Optional["ContainerServiceLinuxProfile"] = None, + windows_profile: Optional["ManagedClusterWindowsProfile"] = None, + service_principal_profile: Optional["ManagedClusterServicePrincipalProfile"] = None, + addon_profiles: Optional[Dict[str, "ManagedClusterAddonProfile"]] = None, + pod_identity_profile: Optional["ManagedClusterPodIdentityProfile"] = None, + node_resource_group: Optional[str] = None, + enable_rbac: Optional[bool] = None, + enable_pod_security_policy: Optional[bool] = None, + network_profile: Optional["ContainerServiceNetworkProfile"] = None, + aad_profile: Optional["ManagedClusterAADProfile"] = None, + auto_upgrade_profile: Optional["ManagedClusterAutoUpgradeProfile"] = None, + auto_scaler_profile: Optional["ManagedClusterPropertiesAutoScalerProfile"] = None, + api_server_access_profile: Optional["ManagedClusterAPIServerAccessProfile"] = None, + disk_encryption_set_id: Optional[str] = None, + identity_profile: Optional[Dict[str, "ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties"]] = None, + private_link_resources: Optional[List["PrivateLinkResource"]] = None, + disable_local_accounts: Optional[bool] = None, + http_proxy_config: Optional["ManagedClusterHTTPProxyConfig"] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["ManagedClusterSKU"] = None, + extended_location: Optional["ExtendedLocation"] = None, + **kwargs + ): + super(ManagedCluster, self).__init__(location=location, tags=tags, identity=identity, kubernetes_version=kubernetes_version, dns_prefix=dns_prefix, fqdn_subdomain=fqdn_subdomain, agent_pool_profiles=agent_pool_profiles, linux_profile=linux_profile, windows_profile=windows_profile, service_principal_profile=service_principal_profile, addon_profiles=addon_profiles, pod_identity_profile=pod_identity_profile, node_resource_group=node_resource_group, enable_rbac=enable_rbac, enable_pod_security_policy=enable_pod_security_policy, network_profile=network_profile, aad_profile=aad_profile, auto_upgrade_profile=auto_upgrade_profile, auto_scaler_profile=auto_scaler_profile, api_server_access_profile=api_server_access_profile, disk_encryption_set_id=disk_encryption_set_id, identity_profile=identity_profile, private_link_resources=private_link_resources, disable_local_accounts=disable_local_accounts, http_proxy_config=http_proxy_config, **kwargs) + self.identity = identity self.provisioning_state = None self.power_state = None self.max_agent_pools = None @@ -1342,48 +1800,63 @@ def __init__(self, *, location: str, tags=None, kubernetes_version: str=None, dn self.private_link_resources = private_link_resources self.disable_local_accounts = disable_local_accounts self.http_proxy_config = http_proxy_config - self.identity = identity + self.sku = sku + self.extended_location = extended_location + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags self.sku = sku self.extended_location = extended_location -class ManagedClusterAADProfile(Model): +class ManagedClusterAADProfile(msrest.serialization.Model): """AADProfile specifies attributes for Azure Active Directory integration. :param managed: Whether to enable managed AAD. :type managed: bool - :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes - authorization. + :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes authorization. :type enable_azure_rbac: bool - :param admin_group_object_ids: AAD group object IDs that will have admin - role of the cluster. - :type admin_group_object_ids: list[str] + :param admin_group_object_i_ds: AAD group object IDs that will have admin role of the cluster. + :type admin_group_object_i_ds: list[str] :param client_app_id: The client AAD application ID. :type client_app_id: str :param server_app_id: The server AAD application ID. :type server_app_id: str :param server_app_secret: The server AAD application secret. :type server_app_secret: str - :param tenant_id: The AAD tenant ID to use for authentication. If not - specified, will use the tenant of the deployment subscription. + :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. :type tenant_id: str """ _attribute_map = { 'managed': {'key': 'managed', 'type': 'bool'}, 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, - 'admin_group_object_ids': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, + 'admin_group_object_i_ds': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, 'tenant_id': {'key': 'tenantID', 'type': 'str'}, } - def __init__(self, *, managed: bool=None, enable_azure_rbac: bool=None, admin_group_object_ids=None, client_app_id: str=None, server_app_id: str=None, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: + def __init__( + self, + *, + managed: Optional[bool] = None, + enable_azure_rbac: Optional[bool] = None, + admin_group_object_i_ds: Optional[List[str]] = None, + client_app_id: Optional[str] = None, + server_app_id: Optional[str] = None, + server_app_secret: Optional[str] = None, + tenant_id: Optional[str] = None, + **kwargs + ): super(ManagedClusterAADProfile, self).__init__(**kwargs) self.managed = managed self.enable_azure_rbac = enable_azure_rbac - self.admin_group_object_ids = admin_group_object_ids + self.admin_group_object_i_ds = admin_group_object_i_ds self.client_app_id = client_app_id self.server_app_id = server_app_id self.server_app_secret = server_app_secret @@ -1393,20 +1866,19 @@ def __init__(self, *, managed: bool=None, enable_azure_rbac: bool=None, admin_gr class ManagedClusterAccessProfile(Resource): """Managed cluster Access Profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id + :ivar id: Resource Id. :vartype id: str - :ivar name: Resource name + :ivar name: Resource name. :vartype name: str - :ivar type: Resource type + :ivar type: Resource type. :vartype type: str - :param location: Required. Resource location + :param location: Required. Resource location. :type location: str - :param tags: Resource tags + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param kube_config: Base64-encoded Kubernetes configuration file. :type kube_config: bytearray @@ -1428,16 +1900,22 @@ class ManagedClusterAccessProfile(Resource): 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, } - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytearray] = None, + **kwargs + ): super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) self.kube_config = kube_config -class ManagedClusterAddonProfile(Model): +class ManagedClusterAddonProfile(msrest.serialization.Model): """A Kubernetes add-on profile for a managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -1461,37 +1939,19 @@ class ManagedClusterAddonProfile(Model): 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, } - def __init__(self, *, enabled: bool, config=None, **kwargs) -> None: + def __init__( + self, + *, + enabled: bool, + config: Optional[Dict[str, str]] = None, + **kwargs + ): super(ManagedClusterAddonProfile, self).__init__(**kwargs) self.enabled = enabled self.config = config self.identity = None -class UserAssignedIdentity(Model): - """UserAssignedIdentity. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.resource_id = resource_id - self.client_id = client_id - self.object_id = object_id - - class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): """Information of user assigned identity used by this add-on. @@ -1509,144 +1969,132 @@ class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): 'object_id': {'key': 'objectId', 'type': 'str'}, } - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs + ): super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) -class ManagedClusterAgentPoolProfileProperties(Model): +class ManagedClusterAgentPoolProfileProperties(msrest.serialization.Model): """Properties for the container service agent pool profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 1000 (inclusive) for user pools and in - the range of 1 to 1000 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. :type count: int :param vm_size: Size of agent VMs. :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS", "Temporary". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param os_sku: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner + for Linux OSType. Not applicable to Windows OSType. Possible values include: "Ubuntu", + "CBLMariner". :type os_sku: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_05_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. + :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs assigned from this + Public IP Prefix. :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool - :param enable_ultra_ssd: Whether to enable UltraSSD + :param enable_ultra_ssd: Whether to enable UltraSSD. :type enable_ultra_ssd: bool - :param enable_fips: Whether to use FIPS enabled OS + :param enable_fips: Whether to use FIPS enabled OS. :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' + :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. Possible + values include: "MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g". :type gpu_instance_profile: str or ~azure.mgmt.containerservice.v2021_05_01.models.GPUInstanceProfile """ _validation = { + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -1691,7 +2139,44 @@ class ManagedClusterAgentPoolProfileProperties(Model): 'gpu_instance_profile': {'key': 'gpuInstanceProfile', 'type': 'str'}, } - def __init__(self, *, count: int=None, vm_size: str=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", os_sku=None, max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, node_public_ip_prefix_id: str=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, enable_ultra_ssd: bool=None, enable_fips: bool=None, gpu_instance_profile=None, **kwargs) -> None: + def __init__( + self, + *, + count: Optional[int] = None, + vm_size: Optional[str] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "KubeletDiskType"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + os_sku: Optional[Union[str, "OSSKU"]] = None, + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type: Optional[Union[str, "AgentPoolType"]] = None, + mode: Optional[Union[str, "AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["AgentPoolUpgradeSettings"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + node_public_ip_prefix_id: Optional[str] = None, + scale_set_priority: Optional[Union[str, "ScaleSetPriority"]] = "Regular", + scale_set_eviction_policy: Optional[Union[str, "ScaleSetEvictionPolicy"]] = "Delete", + spot_max_price: Optional[float] = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["KubeletConfig"] = None, + linux_os_config: Optional["LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + enable_ultra_ssd: Optional[bool] = None, + enable_fips: Optional[bool] = None, + gpu_instance_profile: Optional[Union[str, "GPUInstanceProfile"]] = None, + **kwargs + ): super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) self.count = count self.vm_size = vm_size @@ -1734,142 +2219,123 @@ def __init__(self, *, count: int=None, vm_size: str=None, os_disk_size_gb: int=N class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): """Profile for the container service agent pool. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param count: Number of agents (VMs) to host docker containers. Allowed - values must be in the range of 0 to 1000 (inclusive) for user pools and in - the range of 1 to 1000 (inclusive) for system pools. The default value is - 1. + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. :type count: int :param vm_size: Size of agent VMs. :type vm_size: str - :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk - size for every machine in this master/agent pool. If you specify 0, it - will apply the default osDisk size according to the vmSize specified. + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. :type os_disk_size_gb: int - :param os_disk_type: OS disk type to be used for machines in a given agent - pool. Allowed values are 'Ephemeral' and 'Managed'. If unspecified, - defaults to 'Ephemeral' when the VM supports ephemeral OS and has a cache - disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - 'Managed'. May not be changed after creation. Possible values include: - 'Managed', 'Ephemeral' - :type os_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType - :param kubelet_disk_type: KubeletDiskType determines the placement of - emptyDir volumes, container runtime data root, and Kubelet ephemeral - storage. Currently allows one value, OS, resulting in Kubelet using the OS - disk for data. Possible values include: 'OS', 'Temporary' - :type kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType - :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet - identifier for nodes and maybe pods + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSDiskType + :param kubelet_disk_type: KubeletDiskType determines the placement of emptyDir volumes, + container runtime data root, and Kubelet ephemeral storage. Currently allows one value, OS, + resulting in Kubelet using the OS disk for data. Possible values include: "OS", "Temporary". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.KubeletDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. :type vnet_subnet_id: str - :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier - for pods. + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. :type pod_subnet_id: str :param max_pods: Maximum number of pods that can run on a node. :type max_pods: int - :param os_type: OsType to be used to specify os type. Choose from Linux - and Windows. Default to Linux. Possible values include: 'Linux', - 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param os_sku: OsSKU to be used to specify os sku. Choose from - Ubuntu(default) and CBLMariner for Linux OSType. Not applicable to Windows - OSType. Possible values include: 'Ubuntu', 'CBLMariner' + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param os_sku: OsSKU to be used to specify os sku. Choose from Ubuntu(default) and CBLMariner + for Linux OSType. Not applicable to Windows OSType. Possible values include: "Ubuntu", + "CBLMariner". :type os_sku: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSSKU - :param max_count: Maximum number of nodes for auto-scaling + :param max_count: Maximum number of nodes for auto-scaling. :type max_count: int - :param min_count: Minimum number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling. :type min_count: int - :param enable_auto_scaling: Whether to enable auto-scaler + :param enable_auto_scaling: Whether to enable auto-scaler. :type enable_auto_scaling: bool - :param type: AgentPoolType represents types of an agent pool. Possible - values include: 'VirtualMachineScaleSets', 'AvailabilitySet' - :type type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType - :param mode: AgentPoolMode represents mode of an agent pool. Possible - values include: 'System', 'User' - :type mode: str or - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode - :param orchestrator_version: Version of orchestrator specified when - creating the managed cluster. + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. :type orchestrator_version: str - :ivar node_image_version: Version of node image + :ivar node_image_version: Version of node image. :vartype node_image_version: str - :param upgrade_settings: Settings for upgrading the agentpool + :param upgrade_settings: Settings for upgrading the agentpool. :type upgrade_settings: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeSettings - :ivar provisioning_state: The current deployment or provisioning state, - which only appears in the response. + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. :vartype provisioning_state: str - :ivar power_state: Describes whether the Agent Pool is Running or Stopped - :vartype power_state: - ~azure.mgmt.containerservice.v2021_05_01.models.PowerState - :param availability_zones: Availability zones for nodes. Must use - VirtualMachineScaleSets AgentPoolType. + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2021_05_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. :type availability_zones: list[str] - :param enable_node_public_ip: Enable public IP for nodes + :param enable_node_public_ip: Enable public IP for nodes. :type enable_node_public_ip: bool - :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs - assigned from this Public IP Prefix. + :param node_public_ip_prefix_id: Public IP Prefix ID. VM nodes use IPs assigned from this + Public IP Prefix. :type node_public_ip_prefix_id: str - :param scale_set_priority: ScaleSetPriority to be used to specify virtual - machine scale set priority. Default to regular. Possible values include: - 'Spot', 'Regular'. Default value: "Regular" . + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". :type scale_set_priority: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetPriority - :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to - specify eviction policy for Spot virtual machine scale set. Default to - Delete. Possible values include: 'Delete', 'Deallocate'. Default value: - "Delete" . + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". :type scale_set_eviction_policy: str or ~azure.mgmt.containerservice.v2021_05_01.models.ScaleSetEvictionPolicy - :param spot_max_price: SpotMaxPrice to be used to specify the maximum - price you are willing to pay in US Dollars. Possible values are any - decimal value greater than zero or -1 which indicates default price to be - up-to on-demand. + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. :type spot_max_price: float - :param tags: Agent pool tags to be persisted on the agent pool virtual - machine scale set. + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. :type tags: dict[str, str] - :param node_labels: Agent pool node labels to be persisted across all - nodes in agent pool. + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. :type node_labels: dict[str, str] - :param node_taints: Taints added to new nodes during node pool create and - scale. For example, key=value:NoSchedule. + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. :type node_taints: list[str] :param proximity_placement_group_id: The ID for Proximity Placement Group. :type proximity_placement_group_id: str - :param kubelet_config: KubeletConfig specifies the configuration of - kubelet on agent nodes. - :type kubelet_config: - ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig - :param linux_os_config: LinuxOSConfig specifies the OS configuration of - linux agent nodes. - :type linux_os_config: - ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig - :param enable_encryption_at_host: Whether to enable EncryptionAtHost + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2021_05_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2021_05_01.models.LinuxOSConfig + :param enable_encryption_at_host: Whether to enable EncryptionAtHost. :type enable_encryption_at_host: bool - :param enable_ultra_ssd: Whether to enable UltraSSD + :param enable_ultra_ssd: Whether to enable UltraSSD. :type enable_ultra_ssd: bool - :param enable_fips: Whether to use FIPS enabled OS + :param enable_fips: Whether to use FIPS enabled OS. :type enable_fips: bool - :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU - MIG instance profile for supported GPU VM SKU. Supported values are MIG1g, - MIG2g, MIG3g, MIG4g and MIG7g. Possible values include: 'MIG1g', 'MIG2g', - 'MIG3g', 'MIG4g', 'MIG7g' + :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Supported values are MIG1g, MIG2g, MIG3g, MIG4g and MIG7g. Possible + values include: "MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g". :type gpu_instance_profile: str or ~azure.mgmt.containerservice.v2021_05_01.models.GPUInstanceProfile - :param name: Required. Unique name of the agent pool profile in the - context of the subscription and resource group. + :param name: Required. Unique name of the agent pool profile in the context of the subscription + and resource group. :type name: str """ _validation = { + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, 'node_image_version': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'power_state': {'readonly': True}, @@ -1916,24 +2382,60 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): 'name': {'key': 'name', 'type': 'str'}, } - def __init__(self, *, name: str, count: int=None, vm_size: str=None, os_disk_size_gb: int=None, os_disk_type=None, kubelet_disk_type=None, vnet_subnet_id: str=None, pod_subnet_id: str=None, max_pods: int=None, os_type="Linux", os_sku=None, max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, mode=None, orchestrator_version: str=None, upgrade_settings=None, availability_zones=None, enable_node_public_ip: bool=None, node_public_ip_prefix_id: str=None, scale_set_priority="Regular", scale_set_eviction_policy="Delete", spot_max_price: float=None, tags=None, node_labels=None, node_taints=None, proximity_placement_group_id: str=None, kubelet_config=None, linux_os_config=None, enable_encryption_at_host: bool=None, enable_ultra_ssd: bool=None, enable_fips: bool=None, gpu_instance_profile=None, **kwargs) -> None: + def __init__( + self, + *, + name: str, + count: Optional[int] = None, + vm_size: Optional[str] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "KubeletDiskType"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + os_sku: Optional[Union[str, "OSSKU"]] = None, + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type: Optional[Union[str, "AgentPoolType"]] = None, + mode: Optional[Union[str, "AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["AgentPoolUpgradeSettings"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + node_public_ip_prefix_id: Optional[str] = None, + scale_set_priority: Optional[Union[str, "ScaleSetPriority"]] = "Regular", + scale_set_eviction_policy: Optional[Union[str, "ScaleSetEvictionPolicy"]] = "Delete", + spot_max_price: Optional[float] = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["KubeletConfig"] = None, + linux_os_config: Optional["LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + enable_ultra_ssd: Optional[bool] = None, + enable_fips: Optional[bool] = None, + gpu_instance_profile: Optional[Union[str, "GPUInstanceProfile"]] = None, + **kwargs + ): super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, os_disk_type=os_disk_type, kubelet_disk_type=kubelet_disk_type, vnet_subnet_id=vnet_subnet_id, pod_subnet_id=pod_subnet_id, max_pods=max_pods, os_type=os_type, os_sku=os_sku, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, upgrade_settings=upgrade_settings, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, node_public_ip_prefix_id=node_public_ip_prefix_id, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, proximity_placement_group_id=proximity_placement_group_id, kubelet_config=kubelet_config, linux_os_config=linux_os_config, enable_encryption_at_host=enable_encryption_at_host, enable_ultra_ssd=enable_ultra_ssd, enable_fips=enable_fips, gpu_instance_profile=gpu_instance_profile, **kwargs) self.name = name -class ManagedClusterAPIServerAccessProfile(Model): +class ManagedClusterAPIServerAccessProfile(msrest.serialization.Model): """Access profile for managed cluster API server. - :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API - server. + :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. :type authorized_ip_ranges: list[str] - :param enable_private_cluster: Whether to create the cluster as a private - cluster or not. + :param enable_private_cluster: Whether to create the cluster as a private cluster or not. :type enable_private_cluster: bool :param private_dns_zone: Private dns zone mode for private cluster. :type private_dns_zone: str - :param enable_private_cluster_public_fqdn: Whether to create additional - public FQDN for private cluster or not. + :param enable_private_cluster_public_fqdn: Whether to create additional public FQDN for private + cluster or not. :type enable_private_cluster_public_fqdn: bool """ @@ -1944,7 +2446,15 @@ class ManagedClusterAPIServerAccessProfile(Model): 'enable_private_cluster_public_fqdn': {'key': 'enablePrivateClusterPublicFQDN', 'type': 'bool'}, } - def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=None, private_dns_zone: str=None, enable_private_cluster_public_fqdn: bool=None, **kwargs) -> None: + def __init__( + self, + *, + authorized_ip_ranges: Optional[List[str]] = None, + enable_private_cluster: Optional[bool] = None, + private_dns_zone: Optional[str] = None, + enable_private_cluster_public_fqdn: Optional[bool] = None, + **kwargs + ): super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) self.authorized_ip_ranges = authorized_ip_ranges self.enable_private_cluster = enable_private_cluster @@ -1952,25 +2462,29 @@ def __init__(self, *, authorized_ip_ranges=None, enable_private_cluster: bool=No self.enable_private_cluster_public_fqdn = enable_private_cluster_public_fqdn -class ManagedClusterAutoUpgradeProfile(Model): +class ManagedClusterAutoUpgradeProfile(msrest.serialization.Model): """Auto upgrade profile for a managed cluster. - :param upgrade_channel: upgrade channel for auto upgrade. Possible values - include: 'rapid', 'stable', 'patch', 'node-image', 'none' - :type upgrade_channel: str or - ~azure.mgmt.containerservice.v2021_05_01.models.UpgradeChannel + :param upgrade_channel: upgrade channel for auto upgrade. Possible values include: "rapid", + "stable", "patch", "node-image", "none". + :type upgrade_channel: str or ~azure.mgmt.containerservice.v2021_05_01.models.UpgradeChannel """ _attribute_map = { 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, } - def __init__(self, *, upgrade_channel=None, **kwargs) -> None: + def __init__( + self, + *, + upgrade_channel: Optional[Union[str, "UpgradeChannel"]] = None, + **kwargs + ): super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) self.upgrade_channel = upgrade_channel -class ManagedClusterHTTPProxyConfig(Model): +class ManagedClusterHTTPProxyConfig(msrest.serialization.Model): """Configurations for provisioning the cluster with HTTP proxy servers. :param http_proxy: HTTP proxy server endpoint to use. @@ -1979,8 +2493,7 @@ class ManagedClusterHTTPProxyConfig(Model): :type https_proxy: str :param no_proxy: Endpoints that should not go through proxy. :type no_proxy: list[str] - :param trusted_ca: Alternative CA cert to use for connecting to proxy - servers. + :param trusted_ca: Alternative CA cert to use for connecting to proxy servers. :type trusted_ca: str """ @@ -1991,7 +2504,15 @@ class ManagedClusterHTTPProxyConfig(Model): 'trusted_ca': {'key': 'trustedCa', 'type': 'str'}, } - def __init__(self, *, http_proxy: str=None, https_proxy: str=None, no_proxy=None, trusted_ca: str=None, **kwargs) -> None: + def __init__( + self, + *, + http_proxy: Optional[str] = None, + https_proxy: Optional[str] = None, + no_proxy: Optional[List[str]] = None, + trusted_ca: Optional[str] = None, + **kwargs + ): super(ManagedClusterHTTPProxyConfig, self).__init__(**kwargs) self.http_proxy = http_proxy self.https_proxy = https_proxy @@ -1999,33 +2520,29 @@ def __init__(self, *, http_proxy: str=None, https_proxy: str=None, no_proxy=None self.trusted_ca = trusted_ca -class ManagedClusterIdentity(Model): +class ManagedClusterIdentity(msrest.serialization.Model): """Identity for the managed cluster. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal id of the system assigned identity which - is used by master components. + :ivar principal_id: The principal id of the system assigned identity which is used by master + components. :vartype principal_id: str - :ivar tenant_id: The tenant id of the system assigned identity which is - used by master components. + :ivar tenant_id: The tenant id of the system assigned identity which is used by master + components. :vartype tenant_id: str - :param type: The type of identity used for the managed cluster. Type - 'SystemAssigned' will use an implicitly created identity in master - components and an auto-created user assigned identity in MC_ resource - group in agent nodes. Type 'None' will not use MSI for the managed - cluster, service principal will be used instead. Possible values include: - 'SystemAssigned', 'UserAssigned', 'None' - :type type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ResourceIdentityType - :param user_assigned_identities: The user identity associated with the - managed cluster. This identity will be used in control plane and only one - user assigned identity is allowed. The user identity dictionary key - references will be ARM resource ids in the form: + :param type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use + an implicitly created identity in master components and an auto-created user assigned identity + in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, + service principal will be used instead. Possible values include: "SystemAssigned", + "UserAssigned", "None". + :type type: str or ~azure.mgmt.containerservice.v2021_05_01.models.ResourceIdentityType + :param user_assigned_identities: The user identity associated with the managed cluster. This + identity will be used in control plane and only one user assigned identity is allowed. The user + identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :type user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterIdentityUserAssignedIdentitiesValue] + ~azure.mgmt.containerservice.v2021_05_01.models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties] """ _validation = { @@ -2036,11 +2553,17 @@ class ManagedClusterIdentity(Model): _attribute_map = { 'principal_id': {'key': 'principalId', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedClusterIdentityUserAssignedIdentitiesValue}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties}'}, } - def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + def __init__( + self, + *, + type: Optional[Union[str, "ResourceIdentityType"]] = None, + user_assigned_identities: Optional[Dict[str, "Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None, + **kwargs + ): super(ManagedClusterIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None @@ -2048,61 +2571,60 @@ def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> Non self.user_assigned_identities = user_assigned_identities -class ManagedClusterIdentityUserAssignedIdentitiesValue(Model): - """ManagedClusterIdentityUserAssignedIdentitiesValue. +class ManagedClusterListResult(msrest.serialization.Model): + """The response from the List Managed Clusters operation. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str + :param value: The list of managed clusters. + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] + :ivar next_link: The URL to get the next set of managed cluster results. + :vartype next_link: str """ _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, + 'next_link': {'readonly': True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ManagedCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: - super(ManagedClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None + def __init__( + self, + *, + value: Optional[List["ManagedCluster"]] = None, + **kwargs + ): + super(ManagedClusterListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None -class ManagedClusterLoadBalancerProfile(Model): +class ManagedClusterLoadBalancerProfile(msrest.serialization.Model): """Profile of the managed cluster load balancer. - :param managed_outbound_ips: Desired managed outbound IPs for the cluster - load balancer. - :type managed_outbound_ips: + :param managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. + :type managed_outbound_i_ps: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs - :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the - cluster load balancer. + :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the cluster load + balancer. :type outbound_ip_prefixes: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes - :param outbound_ips: Desired outbound IP resources for the cluster load - balancer. - :type outbound_ips: + :param outbound_i_ps: Desired outbound IP resources for the cluster load balancer. + :type outbound_i_ps: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterLoadBalancerProfileOutboundIPs - :param effective_outbound_ips: The effective outbound IP resources of the - cluster load balancer. - :type effective_outbound_ips: + :param effective_outbound_i_ps: The effective outbound IP resources of the cluster load + balancer. + :type effective_outbound_i_ps: list[~azure.mgmt.containerservice.v2021_05_01.models.ResourceReference] - :param allocated_outbound_ports: Desired number of allocated SNAT ports - per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The - default value is 0 which results in Azure dynamically allocating ports. - Default value: 0 . + :param allocated_outbound_ports: Desired number of allocated SNAT ports per VM. Allowed values + must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure + dynamically allocating ports. :type allocated_outbound_ports: int - :param idle_timeout_in_minutes: Desired outbound flow idle timeout in - minutes. Allowed values must be in the range of 4 to 120 (inclusive). The - default value is 30 minutes. Default value: 30 . + :param idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + must be in the range of 4 to 120 (inclusive). The default value is 30 minutes. :type idle_timeout_in_minutes: int """ @@ -2112,30 +2634,39 @@ class ManagedClusterLoadBalancerProfile(Model): } _attribute_map = { - 'managed_outbound_ips': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, + 'managed_outbound_i_ps': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, - 'outbound_ips': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, - 'effective_outbound_ips': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, + 'outbound_i_ps': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, + 'effective_outbound_i_ps': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, } - def __init__(self, *, managed_outbound_ips=None, outbound_ip_prefixes=None, outbound_ips=None, effective_outbound_ips=None, allocated_outbound_ports: int=0, idle_timeout_in_minutes: int=30, **kwargs) -> None: + def __init__( + self, + *, + managed_outbound_i_ps: Optional["ManagedClusterLoadBalancerProfileManagedOutboundIPs"] = None, + outbound_ip_prefixes: Optional["ManagedClusterLoadBalancerProfileOutboundIPPrefixes"] = None, + outbound_i_ps: Optional["ManagedClusterLoadBalancerProfileOutboundIPs"] = None, + effective_outbound_i_ps: Optional[List["ResourceReference"]] = None, + allocated_outbound_ports: Optional[int] = 0, + idle_timeout_in_minutes: Optional[int] = 30, + **kwargs + ): super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) - self.managed_outbound_ips = managed_outbound_ips + self.managed_outbound_i_ps = managed_outbound_i_ps self.outbound_ip_prefixes = outbound_ip_prefixes - self.outbound_ips = outbound_ips - self.effective_outbound_ips = effective_outbound_ips + self.outbound_i_ps = outbound_i_ps + self.effective_outbound_i_ps = effective_outbound_i_ps self.allocated_outbound_ports = allocated_outbound_ports self.idle_timeout_in_minutes = idle_timeout_in_minutes -class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): +class ManagedClusterLoadBalancerProfileManagedOutboundIPs(msrest.serialization.Model): """Desired managed outbound IPs for the cluster load balancer. - :param count: Desired number of outbound IP created/managed by Azure for - the cluster load balancer. Allowed values must be in the range of 1 to 100 - (inclusive). The default value is 1. . Default value: 1 . + :param count: Desired number of outbound IP created/managed by Azure for the cluster load + balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. :type count: int """ @@ -2147,12 +2678,17 @@ class ManagedClusterLoadBalancerProfileManagedOutboundIPs(Model): 'count': {'key': 'count', 'type': 'int'}, } - def __init__(self, *, count: int=1, **kwargs) -> None: + def __init__( + self, + *, + count: Optional[int] = 1, + **kwargs + ): super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) self.count = count -class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): +class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(msrest.serialization.Model): """Desired outbound IP Prefix resources for the cluster load balancer. :param public_ip_prefixes: A list of public IP prefix resources. @@ -2164,33 +2700,41 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Model): 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, } - def __init__(self, *, public_ip_prefixes=None, **kwargs) -> None: + def __init__( + self, + *, + public_ip_prefixes: Optional[List["ResourceReference"]] = None, + **kwargs + ): super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) self.public_ip_prefixes = public_ip_prefixes -class ManagedClusterLoadBalancerProfileOutboundIPs(Model): +class ManagedClusterLoadBalancerProfileOutboundIPs(msrest.serialization.Model): """Desired outbound IP resources for the cluster load balancer. - :param public_ips: A list of public IP resources. - :type public_ips: - list[~azure.mgmt.containerservice.v2021_05_01.models.ResourceReference] + :param public_i_ps: A list of public IP resources. + :type public_i_ps: list[~azure.mgmt.containerservice.v2021_05_01.models.ResourceReference] """ _attribute_map = { - 'public_ips': {'key': 'publicIPs', 'type': '[ResourceReference]'}, + 'public_i_ps': {'key': 'publicIPs', 'type': '[ResourceReference]'}, } - def __init__(self, *, public_ips=None, **kwargs) -> None: + def __init__( + self, + *, + public_i_ps: Optional[List["ResourceReference"]] = None, + **kwargs + ): super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) - self.public_ips = public_ips + self.public_i_ps = public_i_ps -class ManagedClusterPodIdentity(Model): +class ManagedClusterPodIdentity(msrest.serialization.Model): """ManagedClusterPodIdentity. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2198,15 +2742,12 @@ class ManagedClusterPodIdentity(Model): :type name: str :param namespace: Required. Namespace of the pod identity. :type namespace: str - :param binding_selector: Binding selector to use for the - AzureIdentityBinding resource. + :param binding_selector: Binding selector to use for the AzureIdentityBinding resource. :type binding_selector: str :param identity: Required. Information of the user assigned identity. - :type identity: - ~azure.mgmt.containerservice.v2021_05_01.models.UserAssignedIdentity - :ivar provisioning_state: The current provisioning state of the pod - identity. Possible values include: 'Assigned', 'Updating', 'Deleting', - 'Failed' + :type identity: ~azure.mgmt.containerservice.v2021_05_01.models.UserAssignedIdentity + :ivar provisioning_state: The current provisioning state of the pod identity. Possible values + include: "Assigned", "Updating", "Deleting", "Failed". :vartype provisioning_state: str or ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentityProvisioningState :ivar provisioning_info: @@ -2231,7 +2772,15 @@ class ManagedClusterPodIdentity(Model): 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, } - def __init__(self, *, name: str, namespace: str, identity, binding_selector: str=None, **kwargs) -> None: + def __init__( + self, + *, + name: str, + namespace: str, + identity: "UserAssignedIdentity", + binding_selector: Optional[str] = None, + **kwargs + ): super(ManagedClusterPodIdentity, self).__init__(**kwargs) self.name = name self.namespace = namespace @@ -2241,7 +2790,7 @@ def __init__(self, *, name: str, namespace: str, identity, binding_selector: str self.provisioning_info = None -class ManagedClusterPodIdentityException(Model): +class ManagedClusterPodIdentityException(msrest.serialization.Model): """ManagedClusterPodIdentityException. All required parameters must be populated in order to send to Azure. @@ -2266,26 +2815,32 @@ class ManagedClusterPodIdentityException(Model): 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, } - def __init__(self, *, name: str, namespace: str, pod_labels, **kwargs) -> None: + def __init__( + self, + *, + name: str, + namespace: str, + pod_labels: Dict[str, str], + **kwargs + ): super(ManagedClusterPodIdentityException, self).__init__(**kwargs) self.name = name self.namespace = namespace self.pod_labels = pod_labels -class ManagedClusterPodIdentityProfile(Model): +class ManagedClusterPodIdentityProfile(msrest.serialization.Model): """ManagedClusterPodIdentityProfile. :param enabled: Whether the pod identity addon is enabled. :type enabled: bool - :param allow_network_plugin_kubenet: Customer consent for enabling AAD pod - identity addon in cluster using Kubenet network plugin. + :param allow_network_plugin_kubenet: Customer consent for enabling AAD pod identity addon in + cluster using Kubenet network plugin. :type allow_network_plugin_kubenet: bool :param user_assigned_identities: User assigned pod identity settings. :type user_assigned_identities: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentity] - :param user_assigned_identity_exceptions: User assigned pod identity - exception settings. + :param user_assigned_identity_exceptions: User assigned pod identity exception settings. :type user_assigned_identity_exceptions: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPodIdentityException] """ @@ -2297,7 +2852,15 @@ class ManagedClusterPodIdentityProfile(Model): 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, } - def __init__(self, *, enabled: bool=None, allow_network_plugin_kubenet: bool=None, user_assigned_identities=None, user_assigned_identity_exceptions=None, **kwargs) -> None: + def __init__( + self, + *, + enabled: Optional[bool] = None, + allow_network_plugin_kubenet: Optional[bool] = None, + user_assigned_identities: Optional[List["ManagedClusterPodIdentity"]] = None, + user_assigned_identity_exceptions: Optional[List["ManagedClusterPodIdentityException"]] = None, + **kwargs + ): super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) self.enabled = enabled self.allow_network_plugin_kubenet = allow_network_plugin_kubenet @@ -2305,7 +2868,7 @@ def __init__(self, *, enabled: bool=None, allow_network_plugin_kubenet: bool=Non self.user_assigned_identity_exceptions = user_assigned_identity_exceptions -class ManagedClusterPodIdentityProvisioningInfo(Model): +class ManagedClusterPodIdentityProvisioningInfo(msrest.serialization.Model): """ManagedClusterPodIdentityProvisioningInfo. :param error: Pod identity assignment error (if any). @@ -2316,28 +2879,29 @@ class ManagedClusterPodIdentityProvisioningInfo(Model): 'error': {'key': 'error', 'type': 'CloudError'}, } - def __init__(self, *, error=None, **kwargs) -> None: + def __init__( + self, + *, + error: Optional["CloudError"] = None, + **kwargs + ): super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) self.error = error -class ManagedClusterPoolUpgradeProfile(Model): +class ManagedClusterPoolUpgradeProfile(msrest.serialization.Model): """The list of available upgrade versions. All required parameters must be populated in order to send to Azure. - :param kubernetes_version: Required. Kubernetes version (major, minor, - patch). + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). :type kubernetes_version: str :param name: Pool name. :type name: str - :param os_type: Required. OsType to be used to specify os type. Choose - from Linux and Windows. Default to Linux. Possible values include: - 'Linux', 'Windows'. Default value: "Linux" . - :type os_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.OSType - :param upgrades: List of orchestrator types and versions available for - upgrade. + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. :type upgrades: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] """ @@ -2354,7 +2918,15 @@ class ManagedClusterPoolUpgradeProfile(Model): 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, } - def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", upgrades=None, **kwargs) -> None: + def __init__( + self, + *, + kubernetes_version: str, + os_type: Union[str, "OSType"] = "Linux", + name: Optional[str] = None, + upgrades: Optional[List["ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, + **kwargs + ): super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) self.kubernetes_version = kubernetes_version self.name = name @@ -2362,7 +2934,7 @@ def __init__(self, *, kubernetes_version: str, name: str=None, os_type="Linux", self.upgrades = upgrades -class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): +class ManagedClusterPoolUpgradeProfileUpgradesItem(msrest.serialization.Model): """ManagedClusterPoolUpgradeProfileUpgradesItem. :param kubernetes_version: Kubernetes version (major, minor, patch). @@ -2376,21 +2948,25 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(Model): 'is_preview': {'key': 'isPreview', 'type': 'bool'}, } - def __init__(self, *, kubernetes_version: str=None, is_preview: bool=None, **kwargs) -> None: + def __init__( + self, + *, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) self.kubernetes_version = kubernetes_version self.is_preview = is_preview -class ManagedClusterPropertiesAutoScalerProfile(Model): +class ManagedClusterPropertiesAutoScalerProfile(msrest.serialization.Model): """Parameters to be applied to the cluster-autoscaler when enabled. :param balance_similar_node_groups: :type balance_similar_node_groups: str - :param expander: Possible values include: 'least-waste', 'most-pods', - 'priority', 'random' - :type expander: str or - ~azure.mgmt.containerservice.v2021_05_01.models.Expander + :param expander: Possible values include: "least-waste", "most-pods", "priority", "random". + :type expander: str or ~azure.mgmt.containerservice.v2021_05_01.models.Expander :param max_empty_bulk_delete: :type max_empty_bulk_delete: str :param max_graceful_termination_sec: @@ -2443,7 +3019,28 @@ class ManagedClusterPropertiesAutoScalerProfile(Model): 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, } - def __init__(self, *, balance_similar_node_groups: str=None, expander=None, max_empty_bulk_delete: str=None, max_graceful_termination_sec: str=None, max_node_provision_time: str=None, max_total_unready_percentage: str=None, new_pod_scale_up_delay: str=None, ok_total_unready_count: str=None, scan_interval: str=None, scale_down_delay_after_add: str=None, scale_down_delay_after_delete: str=None, scale_down_delay_after_failure: str=None, scale_down_unneeded_time: str=None, scale_down_unready_time: str=None, scale_down_utilization_threshold: str=None, skip_nodes_with_local_storage: str=None, skip_nodes_with_system_pods: str=None, **kwargs) -> None: + def __init__( + self, + *, + balance_similar_node_groups: Optional[str] = None, + expander: Optional[Union[str, "Expander"]] = None, + max_empty_bulk_delete: Optional[str] = None, + max_graceful_termination_sec: Optional[str] = None, + max_node_provision_time: Optional[str] = None, + max_total_unready_percentage: Optional[str] = None, + new_pod_scale_up_delay: Optional[str] = None, + ok_total_unready_count: Optional[str] = None, + scan_interval: Optional[str] = None, + scale_down_delay_after_add: Optional[str] = None, + scale_down_delay_after_delete: Optional[str] = None, + scale_down_delay_after_failure: Optional[str] = None, + scale_down_unneeded_time: Optional[str] = None, + scale_down_unready_time: Optional[str] = None, + scale_down_utilization_threshold: Optional[str] = None, + skip_nodes_with_local_storage: Optional[str] = None, + skip_nodes_with_system_pods: Optional[str] = None, + **kwargs + ): super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) self.balance_similar_node_groups = balance_similar_node_groups self.expander = expander @@ -2464,37 +3061,14 @@ def __init__(self, *, balance_similar_node_groups: str=None, expander=None, max_ self.skip_nodes_with_system_pods = skip_nodes_with_system_pods -class ManagedClusterPropertiesIdentityProfileValue(UserAssignedIdentity): - """ManagedClusterPropertiesIdentityProfileValue. - - :param resource_id: The resource id of the user assigned identity. - :type resource_id: str - :param client_id: The client id of the user assigned identity. - :type client_id: str - :param object_id: The object id of the user assigned identity. - :type object_id: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str=None, client_id: str=None, object_id: str=None, **kwargs) -> None: - super(ManagedClusterPropertiesIdentityProfileValue, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) - - -class ManagedClusterServicePrincipalProfile(Model): - """Information about a service principal identity for the cluster to use for - manipulating Azure APIs. +class ManagedClusterServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. All required parameters must be populated in order to send to Azure. :param client_id: Required. The ID for the service principal. :type client_id: str - :param secret: The secret password associated with the service principal - in plain text. + :param secret: The secret password associated with the service principal in plain text. :type secret: str """ @@ -2507,23 +3081,25 @@ class ManagedClusterServicePrincipalProfile(Model): 'secret': {'key': 'secret', 'type': 'str'}, } - def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: + def __init__( + self, + *, + client_id: str, + secret: Optional[str] = None, + **kwargs + ): super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) self.client_id = client_id self.secret = secret -class ManagedClusterSKU(Model): +class ManagedClusterSKU(msrest.serialization.Model): """ManagedClusterSKU. - :param name: Name of a managed cluster SKU. Possible values include: - 'Basic' - :type name: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKUName - :param tier: Tier of a managed cluster SKU. Possible values include: - 'Paid', 'Free' - :type tier: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKUTier + :param name: Name of a managed cluster SKU. Possible values include: "Basic". + :type name: str or ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKUName + :param tier: Tier of a managed cluster SKU. Possible values include: "Paid", "Free". + :type tier: str or ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterSKUTier """ _attribute_map = { @@ -2531,17 +3107,22 @@ class ManagedClusterSKU(Model): 'tier': {'key': 'tier', 'type': 'str'}, } - def __init__(self, *, name=None, tier=None, **kwargs) -> None: + def __init__( + self, + *, + name: Optional[Union[str, "ManagedClusterSKUName"]] = None, + tier: Optional[Union[str, "ManagedClusterSKUTier"]] = None, + **kwargs + ): super(ManagedClusterSKU, self).__init__(**kwargs) self.name = name self.tier = tier -class ManagedClusterUpgradeProfile(Model): +class ManagedClusterUpgradeProfile(msrest.serialization.Model): """The list of available upgrades for compute pools. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2551,12 +3132,11 @@ class ManagedClusterUpgradeProfile(Model): :vartype name: str :ivar type: Type of upgrade profile. :vartype type: str - :param control_plane_profile: Required. The list of available upgrade - versions for the control plane. + :param control_plane_profile: Required. The list of available upgrade versions for the control + plane. :type control_plane_profile: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPoolUpgradeProfile - :param agent_pool_profiles: Required. The list of available upgrade - versions for agent pools. + :param agent_pool_profiles: Required. The list of available upgrade versions for agent pools. :type agent_pool_profiles: list[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPoolUpgradeProfile] """ @@ -2577,7 +3157,13 @@ class ManagedClusterUpgradeProfile(Model): 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, } - def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> None: + def __init__( + self, + *, + control_plane_profile: "ManagedClusterPoolUpgradeProfile", + agent_pool_profiles: List["ManagedClusterPoolUpgradeProfile"], + **kwargs + ): super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) self.id = None self.name = None @@ -2586,34 +3172,30 @@ def __init__(self, *, control_plane_profile, agent_pool_profiles, **kwargs) -> N self.agent_pool_profiles = agent_pool_profiles -class ManagedClusterWindowsProfile(Model): +class ManagedClusterWindowsProfile(msrest.serialization.Model): """Profile for Windows VMs in the container service cluster. All required parameters must be populated in order to send to Azure. - :param admin_username: Required. Specifies the name of the administrator - account.

**restriction:** Cannot end in "."

**Disallowed - values:** "administrator", "admin", "user", "user1", "test", "user2", - "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", - "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - "user4", "user5".

**Minimum-length:** 1 character

- **Max-length:** 20 characters + :param admin_username: Required. Specifies the name of the administrator account. + :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", + "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", + "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + "sys", "test2", "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 + character :code:`
`:code:`
` **Max-length:** 20 characters. :type admin_username: str - :param admin_password: Specifies the password of the administrator - account.

**Minimum-length:** 8 characters

- **Max-length:** 123 characters

**Complexity requirements:** 3 out - of 4 conditions below need to be fulfilled
Has lower characters -
Has upper characters
Has a digit
Has a special character - (Regex match [\\W_])

**Disallowed values:** "abc@123", - "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", - "Password!", "Password1", "Password22", "iloveyou!" + :param admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` + **Max-length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". :type admin_password: str - :param license_type: The licenseType to use for Windows VMs. - Windows_Server is used to enable Azure Hybrid User Benefits for Windows - VMs. Possible values include: 'None', 'Windows_Server' - :type license_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.LicenseType + :param license_type: The licenseType to use for Windows VMs. Windows_Server is used to enable + Azure Hybrid User Benefits for Windows VMs. Possible values include: "None", "Windows_Server". + :type license_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.LicenseType :param enable_csi_proxy: Whether to enable CSI proxy. :type enable_csi_proxy: bool """ @@ -2629,7 +3211,15 @@ class ManagedClusterWindowsProfile(Model): 'enable_csi_proxy': {'key': 'enableCSIProxy', 'type': 'bool'}, } - def __init__(self, *, admin_username: str, admin_password: str=None, license_type=None, enable_csi_proxy: bool=None, **kwargs) -> None: + def __init__( + self, + *, + admin_username: str, + admin_password: Optional[str] = None, + license_type: Optional[Union[str, "LicenseType"]] = None, + enable_csi_proxy: Optional[bool] = None, + **kwargs + ): super(ManagedClusterWindowsProfile, self).__init__(**kwargs) self.admin_username = admin_username self.admin_password = admin_password @@ -2637,11 +3227,35 @@ def __init__(self, *, admin_username: str, admin_password: str=None, license_typ self.enable_csi_proxy = enable_csi_proxy -class OperationValue(Model): +class OperationListResult(msrest.serialization.Model): + """The List Compute Operation operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of compute operations. + :vartype value: list[~azure.mgmt.containerservice.v2021_05_01.models.OperationValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationValue]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + + +class OperationValue(msrest.serialization.Model): """Describes the properties of a Compute Operation value. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar origin: The origin of the compute operation. :vartype origin: str @@ -2675,7 +3289,10 @@ class OperationValue(Model): 'provider': {'key': 'display.provider', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(OperationValue, self).__init__(**kwargs) self.origin = None self.name = None @@ -2685,11 +3302,10 @@ def __init__(self, **kwargs) -> None: self.provider = None -class OSOptionProfile(Model): +class OSOptionProfile(msrest.serialization.Model): """The OS option profile. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. @@ -2699,8 +3315,7 @@ class OSOptionProfile(Model): :vartype name: str :ivar type: Type of the OS option profile. :vartype type: str - :param os_option_property_list: Required. The list of OS option - properties. + :param os_option_property_list: Required. The list of OS option properties. :type os_option_property_list: list[~azure.mgmt.containerservice.v2021_05_01.models.OSOptionProperty] """ @@ -2719,7 +3334,12 @@ class OSOptionProfile(Model): 'os_option_property_list': {'key': 'properties.osOptionPropertyList', 'type': '[OSOptionProperty]'}, } - def __init__(self, *, os_option_property_list, **kwargs) -> None: + def __init__( + self, + *, + os_option_property_list: List["OSOptionProperty"], + **kwargs + ): super(OSOptionProfile, self).__init__(**kwargs) self.id = None self.name = None @@ -2727,7 +3347,7 @@ def __init__(self, *, os_option_property_list, **kwargs) -> None: self.os_option_property_list = os_option_property_list -class OSOptionProperty(Model): +class OSOptionProperty(msrest.serialization.Model): """OS option property. All required parameters must be populated in order to send to Azure. @@ -2748,21 +3368,26 @@ class OSOptionProperty(Model): 'enable_fips_image': {'key': 'enable-fips-image', 'type': 'bool'}, } - def __init__(self, *, os_type: str, enable_fips_image: bool, **kwargs) -> None: + def __init__( + self, + *, + os_type: str, + enable_fips_image: bool, + **kwargs + ): super(OSOptionProperty, self).__init__(**kwargs) self.os_type = os_type self.enable_fips_image = enable_fips_image -class OutboundEnvironmentEndpoint(Model): +class OutboundEnvironmentEndpoint(msrest.serialization.Model): """Egress endpoints which AKS agent nodes connect to for common purpose. - :param category: The category of endpoints accessed by the AKS agent node, - e.g. azure-resource-management, apiserver, etc. + :param category: The category of endpoints accessed by the AKS agent node, e.g. + azure-resource-management, apiserver, etc. :type category: str - :param endpoints: The endpoints that AKS agent nodes connect to - :type endpoints: - list[~azure.mgmt.containerservice.v2021_05_01.models.EndpointDependency] + :param endpoints: The endpoints that AKS agent nodes connect to. + :type endpoints: list[~azure.mgmt.containerservice.v2021_05_01.models.EndpointDependency] """ _attribute_map = { @@ -2770,17 +3395,57 @@ class OutboundEnvironmentEndpoint(Model): 'endpoints': {'key': 'endpoints', 'type': '[EndpointDependency]'}, } - def __init__(self, *, category: str=None, endpoints=None, **kwargs) -> None: + def __init__( + self, + *, + category: Optional[str] = None, + endpoints: Optional[List["EndpointDependency"]] = None, + **kwargs + ): super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) self.category = category self.endpoints = endpoints -class PowerState(Model): +class OutboundEnvironmentEndpointCollection(msrest.serialization.Model): + """Collection of OutboundEnvironmentEndpoint. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.OutboundEnvironmentEndpoint] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["OutboundEnvironmentEndpoint"], + **kwargs + ): + super(OutboundEnvironmentEndpointCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class PowerState(msrest.serialization.Model): """Describes the Power State of the cluster. - :param code: Tells whether the cluster is Running or Stopped. Possible - values include: 'Running', 'Stopped' + :param code: Tells whether the cluster is Running or Stopped. Possible values include: + "Running", "Stopped". :type code: str or ~azure.mgmt.containerservice.v2021_05_01.models.Code """ @@ -2788,15 +3453,20 @@ class PowerState(Model): 'code': {'key': 'code', 'type': 'str'}, } - def __init__(self, *, code=None, **kwargs) -> None: + def __init__( + self, + *, + code: Optional[Union[str, "Code"]] = None, + **kwargs + ): super(PowerState, self).__init__(**kwargs) self.code = code -class PrivateEndpoint(Model): +class PrivateEndpoint(msrest.serialization.Model): """Private endpoint which a connection belongs to. - :param id: The resource Id for private endpoint + :param id: The resource Id for private endpoint. :type id: str """ @@ -2804,18 +3474,20 @@ class PrivateEndpoint(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, *, id: str=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): super(PrivateEndpoint, self).__init__(**kwargs) self.id = id -class PrivateEndpointConnection(Model): +class PrivateEndpointConnection(msrest.serialization.Model): """A private endpoint connection. - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The ID of the private endpoint connection. :vartype id: str @@ -2823,16 +3495,14 @@ class PrivateEndpointConnection(Model): :vartype name: str :ivar type: The resource type. :vartype type: str - :ivar provisioning_state: The current provisioning state. Possible values - include: 'Succeeded', 'Creating', 'Deleting', 'Failed' + :ivar provisioning_state: The current provisioning state. Possible values include: "Succeeded", + "Creating", "Deleting", "Failed". :vartype provisioning_state: str or ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnectionProvisioningState :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpoint - :param private_link_service_connection_state: Required. A collection of - information about the state of the connection between service consumer and - provider. + :type private_endpoint: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. :type private_link_service_connection_state: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkServiceConnectionState """ @@ -2842,7 +3512,6 @@ class PrivateEndpointConnection(Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, - 'private_link_service_connection_state': {'required': True}, } _attribute_map = { @@ -2854,7 +3523,13 @@ class PrivateEndpointConnection(Model): 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, } - def __init__(self, *, private_link_service_connection_state, private_endpoint=None, **kwargs) -> None: + def __init__( + self, + *, + private_endpoint: Optional["PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + **kwargs + ): super(PrivateEndpointConnection, self).__init__(**kwargs) self.id = None self.name = None @@ -2864,28 +3539,31 @@ def __init__(self, *, private_link_service_connection_state, private_endpoint=No self.private_link_service_connection_state = private_link_service_connection_state -class PrivateEndpointConnectionListResult(Model): +class PrivateEndpointConnectionListResult(msrest.serialization.Model): """A list of private endpoint connections. :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection] + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection] """ _attribute_map = { 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, } - def __init__(self, *, value=None, **kwargs) -> None: + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnection"]] = None, + **kwargs + ): super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) self.value = value -class PrivateLinkResource(Model): +class PrivateLinkResource(msrest.serialization.Model): """A private link resource. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :param id: The ID of the private link resource. :type id: str @@ -2895,10 +3573,10 @@ class PrivateLinkResource(Model): :type type: str :param group_id: The group ID of the resource. :type group_id: str - :param required_members: RequiredMembers of the resource + :param required_members: RequiredMembers of the resource. :type required_members: list[str] - :ivar private_link_service_id: The private link service ID of the - resource, this field is exposed only to NRP internally. + :ivar private_link_service_id: The private link service ID of the resource, this field is + exposed only to NRP internally. :vartype private_link_service_id: str """ @@ -2915,7 +3593,16 @@ class PrivateLinkResource(Model): 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, } - def __init__(self, *, id: str=None, name: str=None, type: str=None, group_id: str=None, required_members=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + group_id: Optional[str] = None, + required_members: Optional[List[str]] = None, + **kwargs + ): super(PrivateLinkResource, self).__init__(**kwargs) self.id = id self.name = name @@ -2925,30 +3612,33 @@ def __init__(self, *, id: str=None, name: str=None, type: str=None, group_id: st self.private_link_service_id = None -class PrivateLinkResourcesListResult(Model): +class PrivateLinkResourcesListResult(msrest.serialization.Model): """A list of private link resources. :param value: The collection value. - :type value: - list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource] + :type value: list[~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource] """ _attribute_map = { 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, } - def __init__(self, *, value=None, **kwargs) -> None: + def __init__( + self, + *, + value: Optional[List["PrivateLinkResource"]] = None, + **kwargs + ): super(PrivateLinkResourcesListResult, self).__init__(**kwargs) self.value = value -class PrivateLinkServiceConnectionState(Model): +class PrivateLinkServiceConnectionState(msrest.serialization.Model): """The state of a private link service connection. - :param status: The private link service connection status. Possible values - include: 'Pending', 'Approved', 'Rejected', 'Disconnected' - :type status: str or - ~azure.mgmt.containerservice.v2021_05_01.models.ConnectionStatus + :param status: The private link service connection status. Possible values include: "Pending", + "Approved", "Rejected", "Disconnected". + :type status: str or ~azure.mgmt.containerservice.v2021_05_01.models.ConnectionStatus :param description: The private link service connection description. :type description: str """ @@ -2958,13 +3648,19 @@ class PrivateLinkServiceConnectionState(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, *, status=None, description: str=None, **kwargs) -> None: + def __init__( + self, + *, + status: Optional[Union[str, "ConnectionStatus"]] = None, + description: Optional[str] = None, + **kwargs + ): super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) self.status = status self.description = description -class ResourceReference(Model): +class ResourceReference(msrest.serialization.Model): """A reference to an Azure resource. :param id: The fully qualified Azure resource id. @@ -2975,20 +3671,24 @@ class ResourceReference(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, *, id: str=None, **kwargs) -> None: + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): super(ResourceReference, self).__init__(**kwargs) self.id = id -class RunCommandRequest(Model): +class RunCommandRequest(msrest.serialization.Model): """run command request. All required parameters must be populated in order to send to Azure. :param command: Required. command to run. :type command: str - :param context: base64 encoded zip file, contains files required by the - command + :param context: base64 encoded zip file, contains files required by the command. :type context: str :param cluster_token: AuthToken issued for AKS AAD Server App. :type cluster_token: str @@ -3004,29 +3704,35 @@ class RunCommandRequest(Model): 'cluster_token': {'key': 'clusterToken', 'type': 'str'}, } - def __init__(self, *, command: str, context: str=None, cluster_token: str=None, **kwargs) -> None: + def __init__( + self, + *, + command: str, + context: Optional[str] = None, + cluster_token: Optional[str] = None, + **kwargs + ): super(RunCommandRequest, self).__init__(**kwargs) self.command = command self.context = context self.cluster_token = cluster_token -class RunCommandResult(Model): +class RunCommandResult(msrest.serialization.Model): """run command result. - Variables are only populated by the server, and will be ignored when - sending a request. + Variables are only populated by the server, and will be ignored when sending a request. :ivar id: command id. :vartype id: str - :ivar provisioning_state: provisioning State + :ivar provisioning_state: provisioning State. :vartype provisioning_state: str - :ivar exit_code: exit code of the command + :ivar exit_code: exit code of the command. :vartype exit_code: int :ivar started_at: time when the command started. - :vartype started_at: datetime + :vartype started_at: ~datetime.datetime :ivar finished_at: time when the command finished. - :vartype finished_at: datetime + :vartype finished_at: ~datetime.datetime :ivar logs: command output. :vartype logs: str :ivar reason: explain why provisioningState is set to failed (if so). @@ -3053,7 +3759,10 @@ class RunCommandResult(Model): 'reason': {'key': 'properties.reason', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__( + self, + **kwargs + ): super(RunCommandResult, self).__init__(**kwargs) self.id = None self.provisioning_state = None @@ -3064,13 +3773,12 @@ def __init__(self, **kwargs) -> None: self.reason = None -class SysctlConfig(Model): +class SysctlConfig(msrest.serialization.Model): """Sysctl settings for Linux agent nodes. :param net_core_somaxconn: Sysctl setting net.core.somaxconn. :type net_core_somaxconn: int - :param net_core_netdev_max_backlog: Sysctl setting - net.core.netdev_max_backlog. + :param net_core_netdev_max_backlog: Sysctl setting net.core.netdev_max_backlog. :type net_core_netdev_max_backlog: int :param net_core_rmem_default: Sysctl setting net.core.rmem_default. :type net_core_rmem_default: int @@ -3082,45 +3790,33 @@ class SysctlConfig(Model): :type net_core_wmem_max: int :param net_core_optmem_max: Sysctl setting net.core.optmem_max. :type net_core_optmem_max: int - :param net_ipv4_tcp_max_syn_backlog: Sysctl setting - net.ipv4.tcp_max_syn_backlog. + :param net_ipv4_tcp_max_syn_backlog: Sysctl setting net.ipv4.tcp_max_syn_backlog. :type net_ipv4_tcp_max_syn_backlog: int - :param net_ipv4_tcp_max_tw_buckets: Sysctl setting - net.ipv4.tcp_max_tw_buckets. + :param net_ipv4_tcp_max_tw_buckets: Sysctl setting net.ipv4.tcp_max_tw_buckets. :type net_ipv4_tcp_max_tw_buckets: int :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. :type net_ipv4_tcp_fin_timeout: int - :param net_ipv4_tcp_keepalive_time: Sysctl setting - net.ipv4.tcp_keepalive_time. + :param net_ipv4_tcp_keepalive_time: Sysctl setting net.ipv4.tcp_keepalive_time. :type net_ipv4_tcp_keepalive_time: int - :param net_ipv4_tcp_keepalive_probes: Sysctl setting - net.ipv4.tcp_keepalive_probes. + :param net_ipv4_tcp_keepalive_probes: Sysctl setting net.ipv4.tcp_keepalive_probes. :type net_ipv4_tcp_keepalive_probes: int - :param net_ipv4_tcpkeepalive_intvl: Sysctl setting - net.ipv4.tcp_keepalive_intvl. + :param net_ipv4_tcpkeepalive_intvl: Sysctl setting net.ipv4.tcp_keepalive_intvl. :type net_ipv4_tcpkeepalive_intvl: int :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. :type net_ipv4_tcp_tw_reuse: bool - :param net_ipv4_ip_local_port_range: Sysctl setting - net.ipv4.ip_local_port_range. + :param net_ipv4_ip_local_port_range: Sysctl setting net.ipv4.ip_local_port_range. :type net_ipv4_ip_local_port_range: str - :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting - net.ipv4.neigh.default.gc_thresh1. + :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting net.ipv4.neigh.default.gc_thresh1. :type net_ipv4_neigh_default_gc_thresh1: int - :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting - net.ipv4.neigh.default.gc_thresh2. + :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting net.ipv4.neigh.default.gc_thresh2. :type net_ipv4_neigh_default_gc_thresh2: int - :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting - net.ipv4.neigh.default.gc_thresh3. + :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting net.ipv4.neigh.default.gc_thresh3. :type net_ipv4_neigh_default_gc_thresh3: int - :param net_netfilter_nf_conntrack_max: Sysctl setting - net.netfilter.nf_conntrack_max. + :param net_netfilter_nf_conntrack_max: Sysctl setting net.netfilter.nf_conntrack_max. :type net_netfilter_nf_conntrack_max: int - :param net_netfilter_nf_conntrack_buckets: Sysctl setting - net.netfilter.nf_conntrack_buckets. + :param net_netfilter_nf_conntrack_buckets: Sysctl setting net.netfilter.nf_conntrack_buckets. :type net_netfilter_nf_conntrack_buckets: int - :param fs_inotify_max_user_watches: Sysctl setting - fs.inotify.max_user_watches. + :param fs_inotify_max_user_watches: Sysctl setting fs.inotify.max_user_watches. :type fs_inotify_max_user_watches: int :param fs_file_max: Sysctl setting fs.file-max. :type fs_file_max: int @@ -3169,7 +3865,39 @@ class SysctlConfig(Model): 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, } - def __init__(self, *, net_core_somaxconn: int=None, net_core_netdev_max_backlog: int=None, net_core_rmem_default: int=None, net_core_rmem_max: int=None, net_core_wmem_default: int=None, net_core_wmem_max: int=None, net_core_optmem_max: int=None, net_ipv4_tcp_max_syn_backlog: int=None, net_ipv4_tcp_max_tw_buckets: int=None, net_ipv4_tcp_fin_timeout: int=None, net_ipv4_tcp_keepalive_time: int=None, net_ipv4_tcp_keepalive_probes: int=None, net_ipv4_tcpkeepalive_intvl: int=None, net_ipv4_tcp_tw_reuse: bool=None, net_ipv4_ip_local_port_range: str=None, net_ipv4_neigh_default_gc_thresh1: int=None, net_ipv4_neigh_default_gc_thresh2: int=None, net_ipv4_neigh_default_gc_thresh3: int=None, net_netfilter_nf_conntrack_max: int=None, net_netfilter_nf_conntrack_buckets: int=None, fs_inotify_max_user_watches: int=None, fs_file_max: int=None, fs_aio_max_nr: int=None, fs_nr_open: int=None, kernel_threads_max: int=None, vm_max_map_count: int=None, vm_swappiness: int=None, vm_vfs_cache_pressure: int=None, **kwargs) -> None: + def __init__( + self, + *, + net_core_somaxconn: Optional[int] = None, + net_core_netdev_max_backlog: Optional[int] = None, + net_core_rmem_default: Optional[int] = None, + net_core_rmem_max: Optional[int] = None, + net_core_wmem_default: Optional[int] = None, + net_core_wmem_max: Optional[int] = None, + net_core_optmem_max: Optional[int] = None, + net_ipv4_tcp_max_syn_backlog: Optional[int] = None, + net_ipv4_tcp_max_tw_buckets: Optional[int] = None, + net_ipv4_tcp_fin_timeout: Optional[int] = None, + net_ipv4_tcp_keepalive_time: Optional[int] = None, + net_ipv4_tcp_keepalive_probes: Optional[int] = None, + net_ipv4_tcpkeepalive_intvl: Optional[int] = None, + net_ipv4_tcp_tw_reuse: Optional[bool] = None, + net_ipv4_ip_local_port_range: Optional[str] = None, + net_ipv4_neigh_default_gc_thresh1: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh2: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh3: Optional[int] = None, + net_netfilter_nf_conntrack_max: Optional[int] = None, + net_netfilter_nf_conntrack_buckets: Optional[int] = None, + fs_inotify_max_user_watches: Optional[int] = None, + fs_file_max: Optional[int] = None, + fs_aio_max_nr: Optional[int] = None, + fs_nr_open: Optional[int] = None, + kernel_threads_max: Optional[int] = None, + vm_max_map_count: Optional[int] = None, + vm_swappiness: Optional[int] = None, + vm_vfs_cache_pressure: Optional[int] = None, + **kwargs + ): super(SysctlConfig, self).__init__(**kwargs) self.net_core_somaxconn = net_core_somaxconn self.net_core_netdev_max_backlog = net_core_netdev_max_backlog @@ -3201,27 +3929,24 @@ def __init__(self, *, net_core_somaxconn: int=None, net_core_netdev_max_backlog: self.vm_vfs_cache_pressure = vm_vfs_cache_pressure -class SystemData(Model): +class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. :param created_by: The identity that created the resource. :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or - ~azure.mgmt.containerservice.v2021_05_01.models.CreatedByType + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.CreatedByType :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime + :type created_at: ~datetime.datetime :param last_modified_by: The identity that last modified the resource. :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". :type last_modified_by_type: str or ~azure.mgmt.containerservice.v2021_05_01.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. - :type last_modified_at: datetime + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime """ _attribute_map = { @@ -3233,7 +3958,17 @@ class SystemData(Model): 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, } - def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): super(SystemData, self).__init__(**kwargs) self.created_by = created_by self.created_by_type = created_by_type @@ -3243,10 +3978,10 @@ def __init__(self, *, created_by: str=None, created_by_type=None, created_at=Non self.last_modified_at = last_modified_at -class TagsObject(Model): +class TagsObject(msrest.serialization.Model): """Tags object for patch operations. - :param tags: Resource tags. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] """ @@ -3254,16 +3989,21 @@ class TagsObject(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, tags=None, **kwargs) -> None: + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): super(TagsObject, self).__init__(**kwargs) self.tags = tags -class TimeInWeek(Model): +class TimeInWeek(msrest.serialization.Model): """Time in a week. - :param day: A day in a week. Possible values include: 'Sunday', 'Monday', - 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' + :param day: A day in a week. Possible values include: "Sunday", "Monday", "Tuesday", + "Wednesday", "Thursday", "Friday", "Saturday". :type day: str or ~azure.mgmt.containerservice.v2021_05_01.models.WeekDay :param hour_slots: hour slots in a day. :type hour_slots: list[int] @@ -3274,19 +4014,25 @@ class TimeInWeek(Model): 'hour_slots': {'key': 'hourSlots', 'type': '[int]'}, } - def __init__(self, *, day=None, hour_slots=None, **kwargs) -> None: + def __init__( + self, + *, + day: Optional[Union[str, "WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs + ): super(TimeInWeek, self).__init__(**kwargs) self.day = day self.hour_slots = hour_slots -class TimeSpan(Model): +class TimeSpan(msrest.serialization.Model): """The time span with start and end properties. - :param start: The start of a time span - :type start: datetime - :param end: The end of a time span - :type end: datetime + :param start: The start of a time span. + :type start: ~datetime.datetime + :param end: The end of a time span. + :type end: ~datetime.datetime """ _attribute_map = { @@ -3294,7 +4040,13 @@ class TimeSpan(Model): 'end': {'key': 'end', 'type': 'iso-8601'}, } - def __init__(self, *, start=None, end=None, **kwargs) -> None: + def __init__( + self, + *, + start: Optional[datetime.datetime] = None, + end: Optional[datetime.datetime] = None, + **kwargs + ): super(TimeSpan, self).__init__(**kwargs) self.start = start self.end = end diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_paged_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_paged_models.py deleted file mode 100644 index 8908e2e503c..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/models/_paged_models.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationValuePaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationValue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationValue]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationValuePaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class OutboundEnvironmentEndpointPaged(Paged): - """ - A paging container for iterating over a list of :class:`OutboundEnvironmentEndpoint ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'} - } - - def __init__(self, *args, **kwargs): - - super(OutboundEnvironmentEndpointPaged, self).__init__(*args, **kwargs) -class MaintenanceConfigurationPaged(Paged): - """ - A paging container for iterating over a list of :class:`MaintenanceConfiguration ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MaintenanceConfiguration]'} - } - - def __init__(self, *args, **kwargs): - - super(MaintenanceConfigurationPaged, self).__init__(*args, **kwargs) -class AgentPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`AgentPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AgentPool]'} - } - - def __init__(self, *args, **kwargs): - - super(AgentPoolPaged, self).__init__(*args, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/__init__.py old mode 100644 new mode 100755 index d7bfa3f00fe..3942e0ca6a0 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/__init__.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/__init__.py @@ -1,12 +1,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from ._operations import Operations diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_agent_pools_operations.py old mode 100644 new mode 100755 index 9e9dbfdb01d..76b28d7fd51 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_agent_pools_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_agent_pools_operations.py @@ -1,127 +1,141 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class AgentPoolsOperations(object): """AgentPoolsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-05-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" - - self.config = config + self._config = config def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AgentPoolListResult"] """Gets a list of agent pools in the specified managed cluster. - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. + Gets a list of agent pools in the specified managed cluster. The operation returns properties + of each agent pool. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPoolListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('AgentPoolListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} # type: ignore def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPool" """Gets the agent pool. - Gets the details of the agent pool by managed cluster and resource - group. + Gets the details of the agent pool by managed cluster and resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -129,115 +143,122 @@ def get( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPool, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPool + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AgentPool', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + parameters, # type: "_models.AgentPool" + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPool" + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.create_or_update.metadata['url'] + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AgentPool') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AgentPool', pipeline_response) + if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AgentPool', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + parameters, # type: "_models.AgentPool" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AgentPool"] """Creates or updates an agent pool. Creates or updates an agent pool in the specified managed cluster. @@ -248,92 +269,121 @@ def create_or_update( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Create or Update an agent pool operation. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.delete.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Deletes an agent pool. Deletes the agent pool in the specified managed cluster. @@ -344,46 +394,72 @@ def delete( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPoolUpgradeProfile" """Gets upgrade profile for an agent pool. - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. + Gets the details of the upgrade profile for an agent pool with a specified resource group and + managed cluster name. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -391,63 +467,60 @@ def get_upgrade_profile( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get_upgrade_profile.metadata['url'] + url = self.get_upgrade_profile.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) + deserialized = self._deserialize('AgentPoolUpgradeProfile', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} # type: ignore def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPoolAvailableVersions" """Gets a list of supported versions for the specified agent pool. Gets a list of supported versions for the specified agent pool. @@ -456,109 +529,112 @@ def get_available_agent_pool_versions( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolAvailableVersions, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.AgentPoolAvailableVersions + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolAvailableVersions"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] + url = self.get_available_agent_pool_versions.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) + deserialized = self._deserialize('AgentPoolAvailableVersions', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} - + get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} # type: ignore def _upgrade_node_image_version_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.AgentPool"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AgentPool"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.upgrade_node_image_version.metadata['url'] + url = self._upgrade_node_image_version_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None - if response.status_code == 202: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AgentPool', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def upgrade_node_image_version( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + _upgrade_node_image_version_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore + + def begin_upgrade_node_image_version( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AgentPool"] """Upgrade node image version of an agent pool to the latest. Upgrade node image version of an agent pool to the latest. @@ -569,42 +645,59 @@ def upgrade_node_image_version( :type resource_name: str :param agent_pool_name: The name of the agent pool. :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_05_01.models.AgentPool]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._upgrade_node_image_version_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._upgrade_node_image_version_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_maintenance_configurations_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_maintenance_configurations_operations.py old mode 100644 new mode 100755 index 9a2f30f5508..0fdcd1ee2fa --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_maintenance_configurations_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_maintenance_configurations_operations.py @@ -1,129 +1,139 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class MaintenanceConfigurationsOperations(object): """MaintenanceConfigurationsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-05-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" - - self.config = config + self._config = config def list_by_managed_cluster( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of maintenance configurations in the specified managed - cluster. + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.MaintenanceConfigurationListResult"] + """Gets a list of maintenance configurations in the specified managed cluster. - Gets a list of maintenance configurations in the specified managed - cluster. The operation returns properties of each maintenance - configuration. + Gets a list of maintenance configurations in the specified managed cluster. The operation + returns properties of each maintenance configuration. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of MaintenanceConfiguration - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfigurationPaged[~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MaintenanceConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_managed_cluster.metadata['url'] + url = self.list_by_managed_cluster.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('MaintenanceConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.MaintenanceConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list_by_managed_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'} + return ItemPaged( + get_next, extract_data + ) + list_by_managed_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'} # type: ignore def get( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + config_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MaintenanceConfiguration" """Gets the maintenance configuration. - Gets the details of maintenance configurations by managed cluster and - resource group. + Gets the details of maintenance configurations by managed cluster and resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -131,120 +141,138 @@ def get( :type resource_name: str :param config_name: The name of the maintenance configuration. :type config_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MaintenanceConfiguration or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') + 'configName': self._serialize.url("config_name", config_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore + def create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + config_name, # type: str + parameters, # type: "_models.MaintenanceConfiguration" + **kwargs # type: Any + ): + # type: (...) -> "_models.MaintenanceConfiguration" + """Creates or updates a maintenance configurations. - def _create_or_update_initial( - self, resource_group_name, resource_name, config_name, time_in_week=None, not_allowed_time=None, custom_headers=None, raw=False, **operation_config): - parameters = models.MaintenanceConfiguration(time_in_week=time_in_week, not_allowed_time=not_allowed_time) + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :param parameters: Parameters supplied to the Create or Update a default maintenance + configuration. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') + 'configName': self._serialize.url("config_name", config_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'MaintenanceConfiguration') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'MaintenanceConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('MaintenanceConfiguration', response) + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore - def create_or_update( - self, resource_group_name, resource_name, config_name, time_in_week=None, not_allowed_time=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a maintenance configurations. + def delete( + self, + resource_group_name, # type: str + resource_name, # type: str + config_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a maintenance configuration. - Creates or updates a maintenance configuration in the specified managed - cluster. + Deletes the maintenance configuration in the specified managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -252,136 +280,46 @@ def create_or_update( :type resource_name: str :param config_name: The name of the maintenance configuration. :type config_name: str - :param time_in_week: Weekday time slots allowed to upgrade. - :type time_in_week: - list[~azure.mgmt.containerservice.v2021_05_01.models.TimeInWeek] - :param not_allowed_time: Time slots on which upgrade is not allowed. - :type not_allowed_time: - list[~azure.mgmt.containerservice.v2021_05_01.models.TimeSpan] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - MaintenanceConfiguration or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_05_01.models.MaintenanceConfiguration]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - time_in_week=time_in_week, - not_allowed_time=not_allowed_time, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MaintenanceConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} - + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" - def _delete_initial( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'configName': self._serialize.url("config_name", config_name, 'str') + 'configName': self._serialize.url("config_name", config_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, config_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a maintenance configuration. - - Deletes the maintenance configuration in the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param config_name: The name of the maintenance configuration. - :type config_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_managed_clusters_operations.py old mode 100644 new mode 100755 index 8fe243e5cf5..db49ec983fd --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_managed_clusters_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_managed_clusters_operations.py @@ -1,825 +1,845 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class ManagedClustersOperations(object): """ManagedClustersOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-05-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" - - self.config = config + self._config = config def get_os_options( - self, location, resource_type=None, custom_headers=None, raw=False, **operation_config): + self, + location, # type: str + resource_type=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.OSOptionProfile" """Gets supported OS options in the specified subscription. Gets supported OS options in the specified subscription. :param location: The name of a supported Azure region. :type location: str - :param resource_type: resource type for which the OS options needs to - be returned + :param resource_type: resource type for which the OS options needs to be returned. :type resource_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OSOptionProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.OSOptionProfile or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OSOptionProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.OSOptionProfile + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OSOptionProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get_os_options.metadata['url'] + url = self.get_os_options.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'location': self._serialize.url("location", location, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') if resource_type is not None: query_parameters['resource-type'] = self._serialize.query("resource_type", resource_type, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('OSOptionProfile', response) + deserialized = self._deserialize('OSOptionProfile', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_os_options.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default'} + get_os_options.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default'} # type: ignore def list( - self, custom_headers=None, raw=False, **operation_config): + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedClusterListResult"] """Gets a list of managed clusters in the specified subscription. - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] - :raises: :class:`CloudError` + Gets a list of managed clusters in the specified subscription. The operation returns properties + of each managed cluster. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedClusterListResult"] + """Lists managed clusters in the specified subscription and resource group. - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. + Lists managed clusters in the specified subscription and resource group. The operation returns + properties of each managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - return response + return pipeline_response - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedClusterUpgradeProfile" """Gets upgrade profile for a managed cluster. - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. + Gets the details of the upgrade profile for a managed cluster with a specified resource group + and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get_upgrade_profile.metadata['url'] + url = self.get_upgrade_profile.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) + deserialized = self._deserialize('ManagedClusterUpgradeProfile', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} # type: ignore def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + role_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedClusterAccessProfile" """Gets an access profile of a managed cluster. - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. **WARNING**: This API - will be deprecated. Instead use - [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) - or - [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) - . + Gets the accessProfile for the specified role name of the managed cluster with a specified + resource group and name. **WARNING**\ : This API will be deprecated. Instead use + `ListClusterUserCredentials + `_ or + `ListClusterAdminCredentials + `_ . :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. + :param role_name: The name of the role for managed cluster accessProfile resource. :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAccessProfile + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterAccessProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get_access_profile.metadata['url'] + url = self.get_access_profile.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'roleName': self._serialize.url("role_name", role_name, 'str') + 'roleName': self._serialize.url("role_name", role_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) + deserialized = self._deserialize('ManagedClusterAccessProfile', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} + get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} # type: ignore def list_cluster_admin_credentials( - self, resource_group_name, resource_name, server_fqdn=None, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + server_fqdn=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" """Gets cluster admin credential of a managed cluster. - Gets cluster admin credential of the managed cluster with a specified - resource group and name. + Gets cluster admin credential of the managed cluster with a specified resource group and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param server_fqdn: server fqdn type for credentials to be returned + :param server_fqdn: server fqdn type for credentials to be returned. :type server_fqdn: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] + url = self.list_cluster_admin_credentials.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') if server_fqdn is not None: query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) + deserialized = self._deserialize('CredentialResults', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} + list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} # type: ignore def list_cluster_user_credentials( - self, resource_group_name, resource_name, server_fqdn=None, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + server_fqdn=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" """Gets cluster user credential of a managed cluster. - Gets cluster user credential of the managed cluster with a specified - resource group and name. + Gets cluster user credential of the managed cluster with a specified resource group and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param server_fqdn: server fqdn type for credentials to be returned + :param server_fqdn: server fqdn type for credentials to be returned. :type server_fqdn: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] + url = self.list_cluster_user_credentials.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') if server_fqdn is not None: query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) + deserialized = self._deserialize('CredentialResults', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} + list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} # type: ignore def list_cluster_monitoring_user_credentials( - self, resource_group_name, resource_name, server_fqdn=None, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + server_fqdn=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" """Gets cluster monitoring user credential of a managed cluster. - Gets cluster monitoring user credential of the managed cluster with a - specified resource group and name. + Gets cluster monitoring user credential of the managed cluster with a specified resource group + and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param server_fqdn: server fqdn type for credentials to be returned + :param server_fqdn: server fqdn type for credentials to be returned. :type server_fqdn: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.list_cluster_monitoring_user_credentials.metadata['url'] + url = self.list_cluster_monitoring_user_credentials.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') if server_fqdn is not None: query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) + deserialized = self._deserialize('CredentialResults', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} + list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} # type: ignore def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" """Gets a managed cluster. - Gets the details of the managed cluster with a specified resource group - and name. + Gets the details of the managed cluster with a specified resource group and name. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedCluster, or the result of cls(response) :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedCluster" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.create_or_update.metadata['url'] + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedCluster') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) + if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedCluster" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ManagedCluster"] """Creates or updates a managed cluster. - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. + Creates or updates a managed cluster with the specified configuration for agents and Kubernetes + version. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.update_tags.metadata['url'] + url = self._update_tags_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def begin_update_tags( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ManagedCluster"] """Updates tags on a managed cluster. Updates a managed cluster with the specified tags. @@ -828,88 +848,116 @@ def update_tags( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2021_05_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.delete.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Deletes a managed cluster. Deletes the managed cluster with a specified resource group and name. @@ -918,85 +966,117 @@ def delete( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterServicePrincipalProfile" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.reset_service_principal_profile.metadata['url'] + url = self._reset_service_principal_profile_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_service_principal_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + def begin_reset_service_principal_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterServicePrincipalProfile" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Reset Service Principal Profile of a managed cluster. Update the service principal Profile for a managed cluster. @@ -1005,90 +1085,121 @@ def reset_service_principal_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a + Managed Cluster. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterServicePrincipalProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._reset_service_principal_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_service_principal_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterAADProfile" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.reset_aad_profile.metadata['url'] + url = self._reset_aad_profile_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_aad_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + def begin_reset_aad_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterAADProfile" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Reset AAD Profile of a managed cluster. Update the AAD Profile for a managed cluster. @@ -1097,84 +1208,114 @@ def reset_aad_profile( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed + Cluster. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.ManagedClusterAADProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._reset_aad_profile_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_aad_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore def _rotate_cluster_certificates_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.rotate_cluster_certificates.metadata['url'] + url = self._rotate_cluster_certificates_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + if cls: + return cls(pipeline_response, None, {}) - def rotate_cluster_certificates( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + _rotate_cluster_certificates_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore + + def begin_rotate_cluster_certificates( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Rotate certificates of a managed cluster. Rotate certificates of a managed cluster. @@ -1183,79 +1324,110 @@ def rotate_cluster_certificates( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._rotate_cluster_certificates_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._rotate_cluster_certificates_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore def _stop_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.stop.metadata['url'] + url = self._stop_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + if cls: + return cls(pipeline_response, None, {}) - def stop( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore + + def begin_stop( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Stop Managed Cluster. Stops a Running Managed Cluster. @@ -1264,79 +1436,110 @@ def stop( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore def _start_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.start.metadata['url'] + url = self._start_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore - def start( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + def begin_start( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Start Managed Cluster. Starts a Stopped Managed Cluster. @@ -1345,146 +1548,197 @@ def start( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} - + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore def _run_command_initial( - self, resource_group_name, resource_name, request_payload, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + request_payload, # type: "_models.RunCommandRequest" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.RunCommandResult"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.RunCommandResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.run_command.metadata['url'] + url = self._run_command_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request_payload, 'RunCommandRequest') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request_payload, 'RunCommandRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) + deserialized = self._deserialize('RunCommandResult', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - - def run_command( - self, resource_group_name, resource_name, request_payload, custom_headers=None, raw=False, polling=True, **operation_config): + _run_command_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'} # type: ignore + + def begin_run_command( + self, + resource_group_name, # type: str + resource_name, # type: str + request_payload, # type: "_models.RunCommandRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.RunCommandResult"] """Run Command against Managed Kubernetes Service. - Submit a command to run against managed kubernetes service, it will - create a pod to run the command. + Submit a command to run against managed kubernetes service, it will create a pod to run the + command. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param request_payload: Parameters supplied to the RunCommand - operation. - :type request_payload: - ~azure.mgmt.containerservice.v2021_05_01.models.RunCommandRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RunCommandResult or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2021_05_01.models.RunCommandResult] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2021_05_01.models.RunCommandResult]] - :raises: :class:`CloudError` + :param request_payload: Parameters supplied to the RunCommand operation. + :type request_payload: ~azure.mgmt.containerservice.v2021_05_01.models.RunCommandRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either RunCommandResult or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2021_05_01.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._run_command_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - request_payload=request_payload, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RunCommandResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - - def get_long_running_output(response): - deserialized = self._deserialize('RunCommandResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._run_command_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + request_payload=request_payload, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('RunCommandResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'} # type: ignore def get_command_result( - self, resource_group_name, resource_name, command_id, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + command_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.RunCommandResult"] """Get command result. Get command result from previous runCommand invoke. @@ -1495,134 +1749,129 @@ def get_command_result( :type resource_name: str :param command_id: Id of the command request. :type command_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RunCommandResult or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.RunCommandResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RunCommandResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.RunCommandResult or None + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.RunCommandResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get_command_result.metadata['url'] + url = self.get_command_result.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'commandId': self._serialize.url("command_id", command_id, 'str') + 'commandId': self._serialize.url("command_id", command_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('RunCommandResult', response) + deserialized = self._deserialize('RunCommandResult', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get_command_result.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}'} + get_command_result.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}'} # type: ignore def list_outbound_network_dependencies_endpoints( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of egress endpoints (network endpoints of all outbound - dependencies) in the specified managed cluster. + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OutboundEnvironmentEndpointCollection"] + """Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. - Gets a list of egress endpoints (network endpoints of all outbound - dependencies) in the specified managed cluster. The operation returns - properties of each egress endpoint. + Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the + specified managed cluster. The operation returns properties of each egress endpoint. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OutboundEnvironmentEndpoint - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.OutboundEnvironmentEndpointPaged[~azure.mgmt.containerservice.v2021_05_01.models.OutboundEnvironmentEndpoint] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OutboundEnvironmentEndpointCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.OutboundEnvironmentEndpointCollection] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list_outbound_network_dependencies_endpoints.metadata['url'] + url = self.list_outbound_network_dependencies_endpoints.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('OutboundEnvironmentEndpointCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - return response + return pipeline_response - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OutboundEnvironmentEndpointPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints'} + return ItemPaged( + get_next, extract_data + ) + list_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_operations.py old mode 100644 new mode 100755 index a0767bb9e9c..c26019e7667 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_operations.py @@ -1,102 +1,109 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class Operations(object): """Operations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-05-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" - - self.config = config + self._config = config def list( - self, custom_headers=None, raw=False, **operation_config): + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OperationListResult"] """Gets a list of compute operations. - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationValue - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2021_05_01.models.OperationValue] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_05_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: # Construct URL - url = self.list.metadata['url'] - + url = self.list.metadata['url'] # type: ignore # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) return request - def internal_paging(next_link=None): + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): request = prepare_request(next_link) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) + return pipeline_response - return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_private_endpoint_connections_operations.py old mode 100644 new mode 100755 index 45f43e5e70f..4cebbb525d1 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_private_endpoint_connections_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_private_endpoint_connections_operations.py @@ -1,185 +1,187 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class PrivateEndpointConnectionsOperations(object): """PrivateEndpointConnectionsOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-05-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" - - self.config = config + self._config = config def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private endpoint connections in the specified managed - cluster. + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnectionListResult" + """Gets a list of private endpoint connections in the specified managed cluster. - Gets a list of private endpoint connections in the specified managed - cluster. The operation returns properties of each private endpoint - connection. + Gets a list of private endpoint connections in the specified managed cluster. The operation + returns properties of each private endpoint connection. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnectionListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnectionListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnectionListResult + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionListResult', response) + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} # type: ignore def get( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" """Gets the private endpoint connection. - Gets the details of the private endpoint connection by managed cluster - and resource group. + Gets the details of the private endpoint connection by managed cluster and resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. + :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore def update( - self, resource_group_name, resource_name, private_endpoint_connection_name, private_link_service_connection_state, private_endpoint=None, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + parameters, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" """Updates a private endpoint connection. Updates a private endpoint connection in the specified managed cluster. @@ -188,161 +190,177 @@ def update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. + :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str - :param private_link_service_connection_state: A collection of - information about the state of the connection between service consumer - and provider. - :type private_link_service_connection_state: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkServiceConnectionState - :param private_endpoint: The resource of private endpoint. - :type private_endpoint: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpoint - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateEndpointConnection or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :param parameters: Parameters supplied to the Update a private endpoint connection operation. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError """ - parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.update.metadata['url'] + url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} - + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore def _delete_initial( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.delete.metadata['url'] + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] """Deletes a private endpoint connection. - Deletes the private endpoint connection in the specified managed - cluster. + Deletes the private endpoint connection in the specified managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param private_endpoint_connection_name: The name of the private - endpoint connection. + :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - custom_headers=custom_headers, - raw=True, - **operation_config + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_private_link_resources_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_private_link_resources_operations.py old mode 100644 new mode 100755 index e4aeb6ac4bf..09f87df3e66 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_private_link_resources_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_private_link_resources_operations.py @@ -1,106 +1,107 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class PrivateLinkResourcesOperations(object): """PrivateLinkResourcesOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-05-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" - - self.config = config + self._config = config def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResourcesListResult" """Gets a list of private link resources in the specified managed cluster. - Gets a list of private link resources in the specified managed cluster. - The operation returns properties of each private link resource. + Gets a list of private link resources in the specified managed cluster. The operation returns + properties of each private link resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResourcesListResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResourcesListResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResourcesListResult + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesListResult', response) + deserialized = self._deserialize('PrivateLinkResourcesListResult', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_resolve_private_link_service_id_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_resolve_private_link_service_id_operations.py old mode 100644 new mode 100755 index ee7f4649e33..888fd53525f --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_resolve_private_link_service_id_operations.py +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/operations/_resolve_private_link_service_id_operations.py @@ -1,46 +1,57 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class ResolvePrivateLinkServiceIdOperations(object): """ResolvePrivateLinkServiceIdOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2021-05-01". """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): - self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" - - self.config = config + self._config = config def post( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.PrivateLinkResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResource" """Gets the private link service ID for the specified managed cluster. Gets the private link service ID the specified managed cluster. @@ -49,64 +60,56 @@ def post( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. :type resource_name: str - :param parameters: Parameters (name, groupId) supplied in order to - resolve a private link service ID. - :type parameters: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateLinkResource or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :param parameters: Parameters (name, groupId) supplied in order to resolve a private link + service ID. + :type parameters: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_05_01.models.PrivateLinkResource + :raises: ~azure.core.exceptions.HttpResponseError """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + # Construct URL - url = self.post.metadata['url'] + url = self.post.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PrivateLinkResource') + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateLinkResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResource', response) + deserialized = self._deserialize('PrivateLinkResource', pipeline_response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if cls: + return cls(pipeline_response, deserialized, {}) return deserialized - post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} + post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/version.py deleted file mode 100644 index 59e1cf48b15..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_05_01/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "2021-05-01" - diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/version.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/version.py deleted file mode 100644 index 7331ae4ca3a..00000000000 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/version.py +++ /dev/null @@ -1,12 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "11.0.0" diff --git a/src/aks-preview/setup.py b/src/aks-preview/setup.py index b23e457def9..f009d863709 100644 --- a/src/aks-preview/setup.py +++ b/src/aks-preview/setup.py @@ -8,7 +8,7 @@ from codecs import open as open1 from setuptools import setup, find_packages -VERSION = "0.5.19" +VERSION = "0.5.22" CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', diff --git a/src/confluent/HISTORY.rst b/src/confluent/HISTORY.rst index 070d3eec319..af6d1905d18 100644 --- a/src/confluent/HISTORY.rst +++ b/src/confluent/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +0.3.0 ++++++ +* `az confluent offer-detail show`: Remove the properties `isRIRequired` and `msrp` from the output. +* `az confluent organization create`: Fix the issue that organization cannot be created with owner/contributor role through a SG assignment. + 0.2.0 +++++ * [BREAKING CHANGE] `az confluent organization create`: Remove `--user-detail`, the parameter is now auto-filled by the email address, first name and last name decoded from access token. diff --git a/src/confluent/azext_confluent/azext_metadata.json b/src/confluent/azext_confluent/azext_metadata.json index e8ea26c5e57..d2550b4b13d 100644 --- a/src/confluent/azext_confluent/azext_metadata.json +++ b/src/confluent/azext_confluent/azext_metadata.json @@ -1,4 +1,4 @@ { "azext.isExperimental": true, - "azext.minCliCoreVersion": "2.17.0" + "azext.minCliCoreVersion": "2.25.0" } diff --git a/src/confluent/azext_confluent/manual/custom.py b/src/confluent/azext_confluent/manual/custom.py index e995331fd26..a298ae9f4b0 100644 --- a/src/confluent/azext_confluent/manual/custom.py +++ b/src/confluent/azext_confluent/manual/custom.py @@ -29,7 +29,10 @@ def confluent_organization_create(cmd, from azure.cli.command_modules.role.custom import list_role_assignments token_info = Profile(cli_ctx=cmd.cli_ctx).get_raw_token()[0][2] - decode = jwt.decode(token_info['accessToken'], verify=False, algorithms=['RS256']) + # PyJWT < 2.0.0 is using `verify` to verify token + # PyJWT >= 2.0.0 has moved this paramter in options + # For compatibility, keep two options for now. + decode = jwt.decode(token_info['accessToken'], algorithms=['RS256'], verify=False, options={"verify_signature": False}) body = {} body['user_detail'] = {} try: @@ -42,8 +45,8 @@ def confluent_organization_create(cmd, # Check owner or contributor role of subscription user_object_id = decode['oid'] - role_assignments = list_role_assignments(cmd, assignee=user_object_id, role='Owner') + \ - list_role_assignments(cmd, assignee=user_object_id, role='Contributor') + role_assignments = list_role_assignments(cmd, assignee=user_object_id, role='Owner', include_inherited=True, include_groups=True) + \ + list_role_assignments(cmd, assignee=user_object_id, role='Contributor', include_inherited=True, include_groups=True) if not role_assignments: raise UnauthorizedError('You must have Owner or Contributor role of the subscription to create an organization.') @@ -113,7 +116,10 @@ def confluent_offer_detail_show(cmd, publisher_id=None, offer_id=None): 'offerId': offer_id, 'publisherId': publisher_id, 'termUnits':[{ - 'price': item['price'], + 'price': { + 'currencyCode': item['price']['currencyCode'], + 'listPrice': item['price']['listPrice'] + }, 'termDescription': item['termDescription'], 'termUnits': item['termUnits'] } for a in plan['availabilities'] for item in a['terms']] diff --git a/src/confluent/azext_confluent/tests/latest/recordings/test_term_accept_basic_flow.yaml b/src/confluent/azext_confluent/tests/latest/recordings/test_term_accept_basic_flow.yaml new file mode 100644 index 00000000000..67544b3dd30 --- /dev/null +++ b/src/confluent/azext_confluent/tests/latest/recordings/test_term_accept_basic_flow.yaml @@ -0,0 +1,1991 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent offer-detail show + Connection: + - keep-alive + ParameterSetName: + - --publisher-id --offer-id + User-Agent: + - python/3.8.3 (Windows-10-10.0.18362-SP0) AZURECLI/2.26.0 + method: GET + uri: https://management.azure.com/providers/Microsoft.Marketplace/offers/confluentinc.confluent-cloud-azure-stag?excludePublic=true&api-version=2018-08-01-beta + response: + body: + string: "{\"language\":\"en\",\"displayName\":\"Apache Kafka\xAE on Confluent + Cloud\u2122 [STAG-LIFTR]\",\"hasStandardContractAmendments\":false,\"publisherMpnId\":\"6010942\",\"sellerId\":\"27647670\",\"publisherId\":\"confluentinc\",\"publisherDisplayName\":\"Confluent\",\"offerId\":\"confluent-cloud-azure-stag\",\"legacyId\":\"confluentinc.confluent-cloud-azure-stag\",\"determinedStorefronts\":[\"Ibiza\"],\"standardContractAmendmentsRevisionId\":\"00000000-0000-0000-0000-000000000000\",\"longSummary\":\"Fully + managed event streaming platform powered by Apache Kafka\",\"description\":\"

Confluent Cloud is the industry's only fully-managed, cloud-native + event streaming service powered by Apache Kafka\xAE that is:


Serverless. Start streaming in minutes with on-demand + provisioning and elastic scaling for a serverless Kafka experience.

Reliable. Stream with confidence with enterprise-grade + reliability, 99.95% uptime SLAs, multi AZ replication for resilience, on-demand + Kafka bug fixes and upgrades without downtime.

Complete. + Speed up app development with Confluent\u2019s rich pre-built ecosystem of + fully-managed components such as Schema Registry, Connect & ksqlDB.

Flexible. Build a hybrid Kafka service leveraging Confluent + Platform (sold separately) on your on-prem environment with a persistent bridge + to Confluent Cloud with Confluent Replicator.

Service Offerings

Fully-managed + Apache Kafka

  • Basic. Serverless experience with no + hourly compute cost and elastic scaling up to 100MBps a 5TB storage limit. + Basic tier has a 99.5% uptime SLA.
  • Standard. Production-ready + clusters that provide the same elastic experience and same limits as Basic, + covered by a 99.95% uptime SLAs and optional multi AZ replication.
  • Dedicated (commitment + required). Production-ready, completely customizable single-tenant clusters + to run mission-critical applications at any scale. Additional security and + compliance controls such as private networking, HIPAA readiness & more.

Other fully-managed components to speed up app development

  • Schema Registry. + Ensure data compatibility across clusters and apps.
  • Connectors. Instantly + connect to Azure native services like CosmosDB, Azure Blob Storage, and more.
  • ksqlDB. + Build event streaming apps with a lightweight SQL syntax.


Annual Commitments - update

Pay for only + what you use - update\",\"offerType\":\"SaaS\",\"isPrivate\":false,\"isPreview\":false,\"isStopSell\":false,\"fulfillBeforeChargeEligible\":true,\"isvContactDetails\":{\"us\":\"azureteam@confluent.io\"},\"bigId\":\"DZH318Z0D8ZC\",\"legalTermsUri\":\"https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RWDsJD\",\"cspLegalTermsUri\":\"https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RWDsJD\",\"legalTermsType\":\"None\",\"privacyPolicyUri\":\"https://www.confluent.io/confluent-privacy-statement\",\"supportUri\":\"https://www.confluent.io/confluent-cloud/support\",\"version\":\"78ce1bec-d80b-42f5-abde-3d372576b579\",\"categoryIds\":[\"analytics\",\"big-data\",\"real-time-streaming-analytics\",\"azureCertified\",\"fromPublishingPortal\"],\"industryIds\":[],\"links\":[{\"id\":\"Docs\",\"displayName\":\"Docs\",\"uri\":\"https://docs.confluent.io/current/cloud/?utm_medium=partners_marketplace&utm_source=microsoft&utm_campaign=con.confluent_cloud_liftr\"},{\"id\":\"Quick + Start\",\"displayName\":\"Quick Start\",\"uri\":\"https://docs.confluent.io/current/quickstart/cloud-quickstart/index.html?utm_medium=partners_marketplace&utm_source=microsoft&utm_campaign=con.confluent_cloud_liftr\"},{\"id\":\"Community + Forums / Slack\",\"displayName\":\"Community Forums / Slack\",\"uri\":\"https://launchpass.com/confluentcommunity\"},{\"id\":\"FAQs\",\"displayName\":\"FAQs\",\"uri\":\"https://www.confluent.io/confluent-cloud-faqs/?utm_medium=partners_marketplace&utm_source=microsoft&utm_campaign=con.confluent_cloud_liftr\"},{\"id\":\"Whitepaper: + Why Use Kafka to Migrate to the Cloud\",\"displayName\":\"Whitepaper: Why + Use Kafka to Migrate to the Cloud\",\"uri\":\"https://www.confluent.io/resources/why-use-apache-kafka-to-migrate-to-cloud?utm_medium=partners_marketplace&utm_source=microsoft&utm_campaign=con.confluent_cloud_liftr\"},{\"id\":\"Whitepaper: + How to Create a Bridge to Cloud with Kafka and Confluent Cloud\",\"displayName\":\"Whitepaper: + How to Create a Bridge to Cloud with Kafka and Confluent Cloud\",\"uri\":\"https://www.confluent.io/resources/bridge-to-cloud?utm_medium=partners_marketplace&utm_source=microsoft&utm_campaign=con.confluent_cloud_liftr\"},{\"id\":\"Whitepaper: + Confluent Cloud Security Overview\",\"displayName\":\"Whitepaper: Confluent + Cloud Security Overview\",\"uri\":\"https://www.confluent.io/resources/confluent-cloud-security-overview?utm_medium=partners_marketplace&utm_source=microsoft&utm_campaign=con.confluent_cloud_pliftr\"},{\"id\":\"Whitepaper: + End to End Encryption with Confluent Cloud\",\"displayName\":\"Whitepaper: + End to End Encryption with Confluent Cloud\",\"uri\":\"https://www.confluent.io/resources/end-to-end-encryption-with-confluent-cloud?utm_medium=partners_marketplace&utm_source=microsoft&utm_campaign=con.confluent_cloud_liftr\"},{\"id\":\"Whitepaper: + Best Practices for Developing Kafka Applications on Confluent Cloud\",\"displayName\":\"Whitepaper: + Best Practices for Developing Kafka Applications on Confluent Cloud\",\"uri\":\"https://assets.confluent.io/m/14397e757459a58d/original/20200205-WP-Best_Practices_for_Developing_Apache_Kafka_Applications_on_Confluent_Cloud.pdf?utm_medium=partners_marketplace&utm_source=microsoft&utm_campaign=con.confluent_cloud_liftr\"},{\"id\":\"Customer + Case Study: BAADER Blog Post\",\"displayName\":\"Customer Case Study: BAADER + Blog Post\",\"uri\":\"https://www.confluent.io/blog/reshaping-entire-industries-with-iot-and-confluent-cloud/?utm_medium=partners_marketplace&utm_source=microsoft&utm_campaign=con.confluent_cloud_liftr\"},{\"id\":\"Customer + Case Study: Bosch\",\"displayName\":\"Customer Case Study: Bosch\",\"uri\":\"https://www.confluent.io/customers/bosch?utm_medium=partners_marketplace&utm_source=microsoft&utm_campaign=con.confluent_cloud_liftr\"}],\"iconFileUris\":{\"small\":\"https://store-images.s-microsoft.com/image/apps.9151.ef18d5d9-cb9c-4a60-89f2-05d7ff69e05f.38414fed-8958-4bba-bf02-d5d0e43568fc.d799c8e6-bc69-4d6b-8fb9-761dea08888d\",\"medium\":\"https://store-images.s-microsoft.com/image/apps.16931.ef18d5d9-cb9c-4a60-89f2-05d7ff69e05f.38414fed-8958-4bba-bf02-d5d0e43568fc.a39a0711-e5f3-4da0-bd24-c9726b6d9b77\",\"wide\":\"https://store-images.s-microsoft.com/image/apps.32637.ef18d5d9-cb9c-4a60-89f2-05d7ff69e05f.38414fed-8958-4bba-bf02-d5d0e43568fc.89791b8b-40f5-44dd-9589-622611195143\",\"large\":\"https://store-images.s-microsoft.com/image/apps.8342.ef18d5d9-cb9c-4a60-89f2-05d7ff69e05f.38414fed-8958-4bba-bf02-d5d0e43568fc.31aa7943-0cf5-48bd-a932-f4e5bfab0736\"},\"metadata\":{\"leadGeneration\":{\"productId\":null},\"testDrive\":null},\"images\":[{\"context\":\"ibiza\",\"items\":[{\"id\":\"small\",\"uri\":\"https://store-images.s-microsoft.com/image/apps.9151.ef18d5d9-cb9c-4a60-89f2-05d7ff69e05f.38414fed-8958-4bba-bf02-d5d0e43568fc.d799c8e6-bc69-4d6b-8fb9-761dea08888d\",\"type\":\"icon\"},{\"id\":\"medium\",\"uri\":\"https://store-images.s-microsoft.com/image/apps.16931.ef18d5d9-cb9c-4a60-89f2-05d7ff69e05f.38414fed-8958-4bba-bf02-d5d0e43568fc.a39a0711-e5f3-4da0-bd24-c9726b6d9b77\",\"type\":\"icon\"},{\"id\":\"wide\",\"uri\":\"https://store-images.s-microsoft.com/image/apps.32637.ef18d5d9-cb9c-4a60-89f2-05d7ff69e05f.38414fed-8958-4bba-bf02-d5d0e43568fc.89791b8b-40f5-44dd-9589-622611195143\",\"type\":\"icon\"},{\"id\":\"large\",\"uri\":\"https://store-images.s-microsoft.com/image/apps.8342.ef18d5d9-cb9c-4a60-89f2-05d7ff69e05f.38414fed-8958-4bba-bf02-d5d0e43568fc.31aa7943-0cf5-48bd-a932-f4e5bfab0736\",\"type\":\"icon\"},{\"id\":\"screenshot0\",\"uri\":\"https://store-images.s-microsoft.com/image/apps.53299.ef18d5d9-cb9c-4a60-89f2-05d7ff69e05f.38414fed-8958-4bba-bf02-d5d0e43568fc.d40b0f87-579b-45f9-a957-933458800e86\",\"type\":\"screenshot\"}]}],\"videos\":[],\"plans\":[{\"id\":\"0001\",\"displayName\":\"Confluent + Cloud - Pay as you Go\",\"description\":\"

Consumption Based Pricing

Elastically + scale up to 100MBps
Retention of up to 5TB
24x7 expert Kafka support + - optional add-on
VNet peering not supported

Further + explanations of monthly pricing at: http://docs.confluent.io/current/cloud/marketplace/units.html
\",\"restrictedAudience\":{},\"skuId\":\"0001\",\"planId\":\"confluent-cloud-azure-payg-stag\",\"legacyPlanId\":\"confluentinc.confluent-cloud-azure-stagconfluent-cloud-azure-payg-stag\",\"keywords\":[],\"type\":\"SaaS\",\"leadGeneration\":{\"productId\":\"confluentinc.confluent-cloud-azure-stag\"},\"testDrive\":null,\"availabilities\":[{\"actions\":[\"Browse\",\"Curate\",\"Details\",\"Purchase\",\"Renew\"],\"market\":\"US\",\"isPIRequired\":true,\"appId\":\"DZH318Z0D8ZC\",\"planID\":\"0001\",\"meterId\":null,\"meter\":null,\"pricingAudience\":\"DirectCommercial\",\"terms\":[{\"termDescriptionParameters\":null,\"termId\":\"hjdtn7tfnxcy\",\"termUnits\":\"P1M\",\"prorationPolicy\":{\"minimumProratedUnits\":\"P1D\"},\"termDescription\":\"1 + Month Subscription\",\"price\":{\"currencyCode\":\"USD\",\"isPIRequired\":true,\"listPrice\":0.0,\"msrp\":0.0},\"renewTermId\":\"hjdtn7tfnxcy\",\"renewTermUnits\":\"P1M\"}],\"piFilter\":{\"exclusionProperties\":[\"commercial_monetary_commit\",\"LegacySubscriptions\",\"monetary_commitment\",\"NonMobileOperatorContent\",\"StoredValue\",\"Subscriptions\"],\"inclusionProperties\":[]},\"isStopSell\":false,\"hasFreeTrials\":false,\"assetBehaviors\":[\"TermBased\",\"FutureBilling\"],\"consumptionUnitType\":\"DAY\",\"displayRank\":0,\"partitionKey\":\"DZH318Z0D8ZC-US\",\"remediationRequired\":false,\"remediations\":null,\"id\":\"DZH318Z0BL35\",\"_ts\":0,\"_etag\":null},{\"actions\":[\"Browse\",\"Consume\",\"Curate\",\"Details\"],\"market\":\"US\",\"isPIRequired\":true,\"appId\":\"DZH318Z0D8ZC\",\"planID\":\"0001\",\"meterId\":\"confluent_consumption_unit\",\"meter\":{\"meterId\":\"confluent_consumption_unit\",\"partNumber\":\"RJXCLNKF4EN2WOVECCT376MFZEOB7QZJQBNDYDV6A22LAUCLA5EIW3KTDSLR2C6JPZJ6PF2UOI3CWVB66APO4FXCHIAWMHALDNXEWIY\",\"consumptionResourceId\":\"confluent_consumption_unit\",\"price\":{\"currencyCode\":\"USD\",\"isPIRequired\":true,\"listPrice\":0.01,\"msrp\":0.01},\"type\":\"confluent_consumption_unit\",\"includedQuantityProperties\":[{\"termId\":\"hjdtn7tfnxcy\",\"quantity\":\"0\"}]},\"pricingAudience\":\"DirectCommercial\",\"terms\":[{\"termDescriptionParameters\":null,\"termId\":\"rro4hcfnkdoy\",\"termUnits\":\"1\",\"prorationPolicy\":{\"minimumProratedUnits\":null},\"termDescription\":\"Confluent + Consumption Unit\",\"price\":{\"currencyCode\":\"USD\",\"isPIRequired\":true,\"listPrice\":0.01,\"msrp\":0.01},\"renewTermId\":null,\"renewTermUnits\":null}],\"piFilter\":{\"exclusionProperties\":[\"commercial_monetary_commit\",\"LegacySubscriptions\",\"monetary_commitment\",\"NonMobileOperatorContent\",\"StoredValue\",\"Subscriptions\"],\"inclusionProperties\":[]},\"isStopSell\":false,\"hasFreeTrials\":false,\"consumptionUnitType\":\"usageunit\",\"displayRank\":1,\"partitionKey\":\"DZH318Z0D8ZC-US\",\"remediationRequired\":false,\"remediations\":null,\"id\":\"DZH318Z0BL2N\",\"_ts\":0,\"_etag\":null},{\"actions\":[\"Browse\",\"Consume\",\"Curate\",\"Details\"],\"market\":\"US\",\"isPIRequired\":true,\"appId\":\"DZH318Z0D8ZC\",\"planID\":\"0001\",\"meterId\":\"confluent_free_unit\",\"meter\":{\"meterId\":\"confluent_free_unit\",\"partNumber\":\"RJXCLNKF4EN2WOVECCT376MFZEOB7QZJQBNDYDV6A22LAUCLA5EIW3KTDSLR2C6JPZJ6PF2UOI3CWVB66APO4FXCHIAWMHALDNXEWIY\",\"consumptionResourceId\":\"confluent_free_unit\",\"price\":{\"currencyCode\":\"USD\",\"isPIRequired\":true,\"listPrice\":0.0,\"msrp\":0.0},\"type\":\"confluent_free_unit\",\"includedQuantityProperties\":[{\"termId\":\"hjdtn7tfnxcy\",\"quantity\":\"0\"}]},\"pricingAudience\":\"DirectCommercial\",\"terms\":[{\"termDescriptionParameters\":null,\"termId\":\"438w39nkhnjy\",\"termUnits\":\"1\",\"prorationPolicy\":{\"minimumProratedUnits\":null},\"termDescription\":\"Confluent + Free Unit\",\"price\":{\"currencyCode\":\"USD\",\"isPIRequired\":true,\"listPrice\":0.0,\"msrp\":0.0},\"renewTermId\":null,\"renewTermUnits\":null}],\"piFilter\":{\"exclusionProperties\":[\"commercial_monetary_commit\",\"LegacySubscriptions\",\"monetary_commitment\",\"NonMobileOperatorContent\",\"StoredValue\",\"Subscriptions\"],\"inclusionProperties\":[]},\"isStopSell\":false,\"hasFreeTrials\":false,\"consumptionUnitType\":\"freeunit\",\"displayRank\":2,\"partitionKey\":\"DZH318Z0D8ZC-US\",\"remediationRequired\":false,\"remediations\":null,\"id\":\"DZH318Z0BL30\",\"_ts\":0,\"_etag\":null},{\"actions\":[\"Browse\",\"Consume\",\"Curate\",\"Details\"],\"market\":\"US\",\"isPIRequired\":true,\"appId\":\"DZH318Z0D8ZC\",\"planID\":\"0001\",\"meterId\":\"confluent_support_unit\",\"meter\":{\"meterId\":\"confluent_support_unit\",\"partNumber\":\"RJXCLNKF4EN2WOVECCT376MFZEOB7QZJQBNDYDV6A22LAUCLA5EIW3KTDSLR2C6JPZJ6PF2UOI3CWVB66APO4FXCHIAWMHALDNXEWIY\",\"consumptionResourceId\":\"confluent_support_unit\",\"price\":{\"currencyCode\":\"USD\",\"isPIRequired\":true,\"listPrice\":0.01,\"msrp\":0.01},\"type\":\"confluent_support_unit\",\"includedQuantityProperties\":[{\"termId\":\"hjdtn7tfnxcy\",\"quantity\":\"0\"}]},\"pricingAudience\":\"DirectCommercial\",\"terms\":[{\"termDescriptionParameters\":null,\"termId\":\"b19e6d5jyexy\",\"termUnits\":\"1\",\"prorationPolicy\":{\"minimumProratedUnits\":null},\"termDescription\":\"Confluent + Support Unit\",\"price\":{\"currencyCode\":\"USD\",\"isPIRequired\":true,\"listPrice\":0.01,\"msrp\":0.01},\"renewTermId\":null,\"renewTermUnits\":null}],\"piFilter\":{\"exclusionProperties\":[\"commercial_monetary_commit\",\"LegacySubscriptions\",\"monetary_commitment\",\"NonMobileOperatorContent\",\"StoredValue\",\"Subscriptions\"],\"inclusionProperties\":[]},\"isStopSell\":false,\"hasFreeTrials\":false,\"consumptionUnitType\":\"supportunit\",\"displayRank\":3,\"partitionKey\":\"DZH318Z0D8ZC-US\",\"remediationRequired\":false,\"remediations\":null,\"id\":\"DZH318Z0BL33\",\"_ts\":0,\"_etag\":null}],\"categoryIds\":[],\"conversionPaths\":[\"0004\"],\"metadata\":{},\"uiDefinitionUri\":\"https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RWDsJy\",\"artifacts\":[{\"name\":\"UiDefinition.json\",\"uri\":\"https://catalogartifact.azureedge.net/publicartifacts/confluentinc.confluent-cloud-azure-stag-78ce1bec-d80b-42f5-abde-3d372576b579/UiDefinition.json\",\"type\":\"Custom\"},{\"name\":\"DefaultTemplate\",\"uri\":\"https://catalogartifact.azureedge.net/publicartifacts/confluentinc.confluent-cloud-azure-stag-78ce1bec-d80b-42f5-abde-3d372576b579/Artifacts/mainTemplate.json\",\"type\":\"Template\"},{\"name\":\"Documents_recommendations-developers-using-confluent-cloud.pdf\",\"uri\":\"https://catalogartifact.azureedge.net/publicartifacts/confluentinc.confluent-cloud-azure-stag-78ce1bec-d80b-42f5-abde-3d372576b579/Artifacts/Documents/recommendations-developers-using-confluent-cloud.pdf\",\"type\":\"Custom\"},{\"name\":\"SampleImage_apps.53299.ef18d5d9-cb9c-4a60-89f2-05d7ff69e05f.38414fed-8958-4bba-bf02-d5d0e43568fc.d40b0f87-579b-45f9-a957-933458800e86\",\"uri\":\"https://catalogartifact.azureedge.net/publicartifacts/confluentinc.confluent-cloud-azure-stag-78ce1bec-d80b-42f5-abde-3d372576b579/Artifacts/SampleImage/apps.53299.ef18d5d9-cb9c-4a60-89f2-05d7ff69e05f.38414fed-8958-4bba-bf02-d5d0e43568fc.d40b0f87-579b-45f9-a957-933458800e86\",\"type\":\"Custom\"}],\"isPrivate\":true,\"isHidden\":false,\"hasFreeTrials\":false,\"isByol\":false,\"isFree\":false,\"isPayg\":false,\"isStopSell\":false,\"cspState\":\"OptIn\",\"isQuantifiable\":false,\"vmSecuritytype\":\"None\"}],\"isThirdParty\":true,\"keywords\":[\"Kafka\",\"Event + streaming\",\"Real time data integration\",\"Apache Kafka\xAE on Confluent + Cloud\u2122 [STAG-LIFTR]\"],\"popularity\":0.0,\"hasFreeTrials\":false,\"isByol\":false,\"isMacc\":false,\"hasFreePlans\":false,\"isQuantifiable\":false,\"hasPaygPlans\":false,\"isReseller\":false,\"isExcludedFromSearch\":false,\"applicableStoreFronts\":1,\"offerVersion\":\"1021\",\"isMicrosoftProduct\":true,\"productOwnershipSellingMotion\":\"3PPAgency\",\"documentLinks\":[{\"id\":\"document0\",\"displayName\":\"Whitepaper: + Recommendations for Developers Using Confluent Cloud\",\"uri\":\"https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RWDsJC\"}],\"offerEnvironment\":0,\"linkedAddIns\":[],\"excludeFromBootstrap\":false,\"disableSendEmailOnPurchase\":true,\"hideFromSaasBlade\":true,\"integratedWithMicrosoftGraphApi\":false,\"id\":\"confluentinc.confluent-cloud-azure-stag\",\"partitionKey\":null,\"_ts\":0,\"_etag\":null}" + headers: + cache-control: + - no-cache + content-length: + - '16295' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:17:12 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + set-cookie: + - ARRAffinity=49e9f48782245c3a112318f3138db01c0738f2f775cac97aa9f0b55a4b0ee6a0;Path=/;HttpOnly;Secure;Domain=marketplacerp.azure.com + - ARRAffinitySameSite=49e9f48782245c3a112318f3138db01c0738f2f775cac97aa9f0b55a4b0ee6a0;Path=/;HttpOnly;SameSite=None;Secure;Domain=marketplacerp.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-catalog-claims: + - eyJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL21hcmtldHBsYWNlLzIwMTQvMDYvY2xhaW1zL2Nhbm9udHlwZSI6Ik90aGVyIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS9tYXJrZXRwbGFjZS8yMDE2LzEyL2NsYWltcy9wcmljaW5nYXVkaWVuY2UiOiJEaXJlY3QtQ29tbWVyY2lhbCIsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vbWFya2V0cGxhY2UvMjAxNC8wNi9jbGFpbXMvdGVuYW50aWQiOiIyZDY1MTM4NC0wMzgzLTQzMTgtYWJjZi1jYjdkNzBkNTQ2OWUiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL21hcmtldHBsYWNlLzIwMTgvMDcvY2xhaW1zL25hdGlvbmFsY2xvdWQiOiJHbG9iYWwiLCJ1cm46bWFya2V0cGxhY2VzZXJ2aWNlczpwZXJtaXNzaW9uIjoiRW50ZXJwcmlzZUNhdGFsb2dCcm93c2UifQ== + x-ms-catalog-parameters: + - eyJhZ3JlZW1lbnRUeXBlIjoiTW9kZXJuIiwiU3VwcG9ydGVkQ29udGVudFZlcnNpb24iOiIyMDE4LjA4LjMxLjAifQ== + x-ms-version: + - 1.0.0.1799 (AzureUX-MarketPlaceRP:log_fix_hf_14_06_21.ed018e8d5.210704-0513) + x-powered-by: + - ASP.NET + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - term accept + Connection: + - keep-alive + ParameterSetName: + - --product --plan --publisher + User-Agent: + - AZURECLI/2.26.0 azsdk-python-mgmt-marketplaceordering/1.1.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MarketplaceOrdering/offerTypes/virtualmachine/publishers/confluentinc/offers/confluent-cloud-azure-stag/plans/confluent-cloud-azure-payg-stag/agreements/current?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MarketplaceOrdering/offerTypes/VirtualMachine/publishers/confluentinc/offers/confluent-cloud-azure-stag/plans/confluent-cloud-azure-payg-stag/agreements/current","name":"confluent-cloud-azure-payg-stag","type":"Microsoft.MarketplaceOrdering/offertypes","properties":{"publisher":"confluentinc","product":"confluent-cloud-azure-stag","plan":"confluent-cloud-azure-payg-stag","licenseTextLink":"https://mpcprodsa.blob.core.windows.net/legalterms/3E5ED_legalterms_CONFLUENTINC%253a24CONFLUENT%253a2DCLOUD%253a2DAZURE%253a2DSTAG%253a24CONFLUENT%253a2DCLOUD%253a2DAZURE%253a2DPAYG%253a2DSTAG%253a24PZL3GA56VIMMBK2GFQW4XCR5EXK4HXBVMYPKNLDNK2XUP2VOAGNJYJEKWFV6KJWZ55ALF5CPSPUJKHJZMLDBDRMRMRFJJ4FCHB777QY.txt","privacyPolicyLink":"https://www.confluent.io/confluent-privacy-statement","marketplaceTermsLink":"https://mpcprodsa.blob.core.windows.net/marketplaceterms/3EDEF_marketplaceterms_SAAS%253a245XNIYDD23KXQBTPZZUVTDJNYHJZ5Y76OXRLYJ2DHP67BFUMFY42RHUG62CKSGJIAUTE2UN6MIODUJ4JBTOMEQBMWQM4VD2QGXBRTTUY.txt","retrieveDatetime":"2021-07-06T09:17:16.6324828Z","signature":"ND4MBMGOWNNW7J7LXLPKWSNGUQCNOMXSVTZ3XWWM7AGIYSA7X7E4GXXYTD4WL7GBO6SZZ3OXXSGID7NWWODP43JLWUIGPCHDMIXYDFI","accepted":true},"systemData":{"createdBy":"743b94f5-f31d-4ae1-91ab-478313c8302e","createdByType":"ManagedIdentity","createdAt":"2021-07-06T09:17:16.8193719+00:00","lastModifiedBy":"743b94f5-f31d-4ae1-91ab-478313c8302e","lastModifiedByType":"ManagedIdentity","lastModifiedAt":"2021-07-06T09:17:16.8193719+00:00"}}' + headers: + cache-control: + - no-cache + content-length: + - '1561' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:17:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + set-cookie: + - ARRAffinity=eea7de65d7f259aac01b158ebdbecf1b308d46f0e4db9431c52f144539f9faab;Path=/;HttpOnly;Secure;Domain=storeapi.azure.com + - ARRAffinitySameSite=eea7de65d7f259aac01b158ebdbecf1b308d46f0e4db9431c52f144539f9faab;Path=/;HttpOnly;SameSite=None;Secure;Domain=storeapi.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"publisher": "confluentinc", "product": "confluent-cloud-azure-stag", + "plan": "confluent-cloud-azure-payg-stag", "licenseTextLink": "https://mpcprodsa.blob.core.windows.net/legalterms/3E5ED_legalterms_CONFLUENTINC%253a24CONFLUENT%253a2DCLOUD%253a2DAZURE%253a2DSTAG%253a24CONFLUENT%253a2DCLOUD%253a2DAZURE%253a2DPAYG%253a2DSTAG%253a24PZL3GA56VIMMBK2GFQW4XCR5EXK4HXBVMYPKNLDNK2XUP2VOAGNJYJEKWFV6KJWZ55ALF5CPSPUJKHJZMLDBDRMRMRFJJ4FCHB777QY.txt", + "privacyPolicyLink": "https://www.confluent.io/confluent-privacy-statement", + "marketplaceTermsLink": "https://mpcprodsa.blob.core.windows.net/marketplaceterms/3EDEF_marketplaceterms_SAAS%253a245XNIYDD23KXQBTPZZUVTDJNYHJZ5Y76OXRLYJ2DHP67BFUMFY42RHUG62CKSGJIAUTE2UN6MIODUJ4JBTOMEQBMWQM4VD2QGXBRTTUY.txt", + "retrieveDatetime": "2021-07-06T09:17:16.6324828Z", "signature": "ND4MBMGOWNNW7J7LXLPKWSNGUQCNOMXSVTZ3XWWM7AGIYSA7X7E4GXXYTD4WL7GBO6SZZ3OXXSGID7NWWODP43JLWUIGPCHDMIXYDFI", + "accepted": true}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - term accept + Connection: + - keep-alive + Content-Length: + - '952' + Content-Type: + - application/json + ParameterSetName: + - --product --plan --publisher + User-Agent: + - AZURECLI/2.26.0 azsdk-python-mgmt-marketplaceordering/1.1.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MarketplaceOrdering/offerTypes/virtualmachine/publishers/confluentinc/offers/confluent-cloud-azure-stag/plans/confluent-cloud-azure-payg-stag/agreements/current?api-version=2021-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MarketplaceOrdering/offerTypes/Microsoft.MarketplaceOrdering/offertypes/publishers/confluentinc/offers/confluent-cloud-azure-stag/plans/confluent-cloud-azure-payg-stag/agreements/current","name":"confluent-cloud-azure-payg-stag","type":"Microsoft.MarketplaceOrdering/offertypes","properties":{"publisher":"confluentinc","product":"confluent-cloud-azure-stag","plan":"confluent-cloud-azure-payg-stag","licenseTextLink":"https://mpcprodsa.blob.core.windows.net/legalterms/3E5ED_legalterms_CONFLUENTINC%253a24CONFLUENT%253a2DCLOUD%253a2DAZURE%253a2DSTAG%253a24CONFLUENT%253a2DCLOUD%253a2DAZURE%253a2DPAYG%253a2DSTAG%253a24PZL3GA56VIMMBK2GFQW4XCR5EXK4HXBVMYPKNLDNK2XUP2VOAGNJYJEKWFV6KJWZ55ALF5CPSPUJKHJZMLDBDRMRMRFJJ4FCHB777QY.txt","privacyPolicyLink":"https://www.confluent.io/confluent-privacy-statement","marketplaceTermsLink":"https://mpcprodsa.blob.core.windows.net/marketplaceterms/3EDEF_marketplaceterms_SAAS%253a245XNIYDD23KXQBTPZZUVTDJNYHJZ5Y76OXRLYJ2DHP67BFUMFY42RHUG62CKSGJIAUTE2UN6MIODUJ4JBTOMEQBMWQM4VD2QGXBRTTUY.txt","retrieveDatetime":"2021-07-06T09:17:16.6324828Z","signature":"ND4MBMGOWNNW7J7LXLPKWSNGUQCNOMXSVTZ3XWWM7AGIYSA7X7E4GXXYTD4WL7GBO6SZZ3OXXSGID7NWWODP43JLWUIGPCHDMIXYDFI","accepted":true},"systemData":{"createdBy":"743b94f5-f31d-4ae1-91ab-478313c8302e","createdByType":"ManagedIdentity","createdAt":"2021-07-06T09:17:18.519461+00:00","lastModifiedBy":"743b94f5-f31d-4ae1-91ab-478313c8302e","lastModifiedByType":"ManagedIdentity","lastModifiedAt":"2021-07-06T09:17:18.519461+00:00"}}' + headers: + cache-control: + - no-cache + content-length: + - '1585' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:17:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + set-cookie: + - ARRAffinity=e939a948e0a0e7a43aad2b71916290a218f316793bcfc54015a7592e915d08a7;Path=/;HttpOnly;Secure;Domain=storeapi.azure.com + - ARRAffinitySameSite=e939a948e0a0e7a43aad2b71916290a218f316793bcfc54015a7592e915d08a7;Path=/;HttpOnly;SameSite=None;Secure;Domain=storeapi.azure.com + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - provider register + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json + ParameterSetName: + - -n + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent/register?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France + Central","Canada Central","East US","UK South","West Europe","Central US","East + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","West Central US","Australia East","France Central","Canada Central","East + US","UK South","West Europe","Central US","East US 2","North Europe","Southeast + Asia","East US 2 EUAP","Central US EUAP"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":[],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' + headers: + cache-control: + - no-cache + content-length: + - '1756' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:17:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - provider show + Connection: + - keep-alive + ParameterSetName: + - -n + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Confluent","namespace":"Microsoft.Confluent","authorizations":[{"applicationId":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","roleDefinitionId":"4db34280-b0be-4827-aa5b-418391409cee"}],"resourceTypes":[{"resourceType":"operations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/OperationStatuses","locations":["West + US 2","East US 2 EUAP","Central US EUAP","West Central US","Australia East","France + Central","Canada Central","East US","UK South","West Europe","Central US","East + US 2","North Europe","Southeast Asia"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"organizations","locations":["West + US 2","West Central US","Australia East","France Central","Canada Central","East + US","UK South","West Europe","Central US","East US 2","North Europe","Southeast + Asia","East US 2 EUAP","Central US EUAP"],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"agreements","locations":[],"apiVersions":["2021-03-01-preview","2020-03-01-preview","2020-03-01"],"capabilities":"None"},{"resourceType":"validations","locations":[],"apiVersions":["2021-03-01-preview"],"capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' + headers: + cache-control: + - no-cache + content-length: + - '1756' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:17:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.26.0 + accept-language: + - en-US + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/servicePrincipals?$filter=servicePrincipalNames%2Fany%28c%3Ac%20eq%20%27b9c6016b-2e30-45fa-964e-414f0fc9272a%27%29&api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Tue, 06 Jul 2021 09:17:24 GMT + duration: + - '2598149' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - 1ICy8+R0aKQJ9dP+Wf5pzoAW2T+QDLKgUdkZaEH0rOw= + ocp-aad-session-key: + - AoUOIROjdi9BBkDBdRPoxaCeSCuoTeNE-TZ02zEoGhUHpcUfoCSBqEaZgYN1ybsIJmq_coNXgUrnuJPbpnH62kdFkkHWtYBKkBAbl-4gZCrFNhWx6Th7TSG8K5PMGwQZ.-8H7d2RKNYQ2AGmaN4hyvdQLQCzPeLmvh918Vneo4pM + pragma: + - no-cache + request-id: + - 1a095166-56c8-4d67-9aa2-11a14ef0b4e8 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-ms-resource-unit: + - '1' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"objectIds": ["b9c6016b-2e30-45fa-964e-414f0fc9272a"], "includeDirectoryObjectReferences": + true}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + Content-Length: + - '97' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.26.0 + accept-language: + - en-US + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/getObjectsByObjectIds?api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.User","objectType":"User","objectId":"b9c6016b-2e30-45fa-964e-414f0fc9272a","deletionTimestamp":null,"accountEnabled":true,"ageGroup":null,"assignedLicenses":[],"assignedPlans":[],"city":null,"companyName":null,"consentProvidedForMinor":null,"country":null,"createdDateTime":"2021-05-28T09:30:27Z","creationType":"Invitation","department":null,"dirSyncEnabled":null,"displayName":"Kaihui + Sun (Wicresoft North America Ltd)","employeeId":null,"facsimileTelephoneNumber":null,"givenName":"Kaihui","immutableId":null,"isCompromised":null,"jobTitle":null,"lastDirSyncTime":null,"legalAgeGroupClassification":null,"mail":"v-kaisun@microsoft.com","mailNickname":"v-kaisun_microsoft.com#EXT#","mobile":null,"onPremisesDistinguishedName":null,"onPremisesSecurityIdentifier":null,"otherMails":["v-kaisun@microsoft.com"],"passwordPolicies":null,"passwordProfile":null,"physicalDeliveryOfficeName":null,"postalCode":null,"preferredLanguage":null,"provisionedPlans":[],"provisioningErrors":[],"proxyAddresses":["SMTP:v-kaisun@microsoft.com"],"refreshTokensValidFromDateTime":"2021-05-28T09:30:27Z","showInAddressList":false,"signInNames":[],"sipProxyAddress":null,"state":null,"streetAddress":null,"surname":"Sun","telephoneNumber":null,"thumbnailPhoto@odata.mediaEditLink":"directoryObjects/b9c6016b-2e30-45fa-964e-414f0fc9272a/Microsoft.DirectoryServices.User/thumbnailPhoto","usageLocation":null,"userIdentities":[],"userPrincipalName":"v-kaisun_microsoft.com#EXT#@mpliftrconfluent20210809out.onmicrosoft.com","userState":"Accepted","userStateChangedOn":"2021-07-05T05:41:25Z","userType":"Member"}]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '1751' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Tue, 06 Jul 2021 09:17:25 GMT + duration: + - '2511594' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - xKxlVDcO27uDZc6zKVj7K84BUT9c7l5Jyq7NtNFKB0Y= + ocp-aad-session-key: + - wiHcoU6cZ11S7gOgiUBaEGA7MqNUFAW0O8w0ZHw_K0z0jH5bKyR0DEyCb2Xk2nvEdywS1RC8C1kOkGGx7vhL1pGdPFzoQRP8KQsoMFl9yWpg-8Rnd2l59L6idQNoqt4l.TdUrSPId40HIMq7Tp3m_pqMq2wYiBD_xGN-KcQreRBc + pragma: + - no-cache + request-id: + - 2d0c8de7-6e0d-4f55-8cfe-f25c86be2292 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-ms-resource-unit: + - '3' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.26.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments?$filter=atScope%28%29%20and%20assignedTo%28%27b9c6016b-2e30-45fa-964e-414f0fc9272a%27%29&api-version=2020-04-01-preview + response: + body: + string: '{"value":[{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"b9c6016b-2e30-45fa-964e-414f0fc9272a","principalType":"User","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2021-05-28T09:31:07.8102180Z","updatedOn":"2021-05-28T09:31:07.8102180Z","createdBy":"a9cb2b23-249d-4efa-af64-d7cbe600eae1","updatedBy":"a9cb2b23-249d-4efa-af64-d7cbe600eae1","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/85f02850-c7ee-4da6-9a5f-9f46ecda3aa7","type":"Microsoft.Authorization/roleAssignments","name":"85f02850-c7ee-4da6-9a5f-9f46ecda3aa7"}]}' + headers: + cache-control: + - no-cache + content-length: + - '857' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:17:26 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + Cookie: + - x-ms-gateway-slice=Production + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.26.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Owner%27&api-version=2018-01-01-preview + response: + body: + string: '{"value":[{"properties":{"roleName":"Owner","type":"BuiltInRole","description":"Grants + full access to manage all resources, including the ability to assign roles + in Azure RBAC.","assignableScopes":["/"],"permissions":[{"actions":["*"],"notActions":[],"dataActions":[],"notDataActions":[]}],"createdOn":"2015-02-02T21:55:09.8806423Z","updatedOn":"2020-08-14T20:13:58.4137852Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","type":"Microsoft.Authorization/roleDefinitions","name":"8e3af657-a8ff-443c-a75c-2fe8c4bcb635"}]}' + headers: + cache-control: + - no-cache + content-length: + - '654' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:17:26 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.26.0 + accept-language: + - en-US + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/servicePrincipals?$filter=servicePrincipalNames%2Fany%28c%3Ac%20eq%20%27b9c6016b-2e30-45fa-964e-414f0fc9272a%27%29&api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Tue, 06 Jul 2021 09:17:27 GMT + duration: + - '2550465' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - AMMAxGGLAEpBasUWsDQcwrC0id/i/47wod6hWW2yLLI= + ocp-aad-session-key: + - DIPrcbqmRiP3B2iy-5W94s3IL3nt3Spb0TiG5qmSBUtrbKejWrSdvu9lQapbfBs1R8sct676sVjycQD3naeYDD0hqrF7WiWFoF-mMJhkEJmgfJ8pKw0SACLdPh_OJg56.f0Eg4BM4sZGvDfCYeOym1x-0weB-rBSCX3Gpz5lgfB0 + pragma: + - no-cache + request-id: + - 886b68f8-19f7-4e08-8025-d11caeb0978c + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-ms-resource-unit: + - '1' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"objectIds": ["b9c6016b-2e30-45fa-964e-414f0fc9272a"], "includeDirectoryObjectReferences": + true}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + Content-Length: + - '97' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.26.0 + accept-language: + - en-US + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/getObjectsByObjectIds?api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.User","objectType":"User","objectId":"b9c6016b-2e30-45fa-964e-414f0fc9272a","deletionTimestamp":null,"accountEnabled":true,"ageGroup":null,"assignedLicenses":[],"assignedPlans":[],"city":null,"companyName":null,"consentProvidedForMinor":null,"country":null,"createdDateTime":"2021-05-28T09:30:27Z","creationType":"Invitation","department":null,"dirSyncEnabled":null,"displayName":"Kaihui + Sun (Wicresoft North America Ltd)","employeeId":null,"facsimileTelephoneNumber":null,"givenName":"Kaihui","immutableId":null,"isCompromised":null,"jobTitle":null,"lastDirSyncTime":null,"legalAgeGroupClassification":null,"mail":"v-kaisun@microsoft.com","mailNickname":"v-kaisun_microsoft.com#EXT#","mobile":null,"onPremisesDistinguishedName":null,"onPremisesSecurityIdentifier":null,"otherMails":["v-kaisun@microsoft.com"],"passwordPolicies":null,"passwordProfile":null,"physicalDeliveryOfficeName":null,"postalCode":null,"preferredLanguage":null,"provisionedPlans":[],"provisioningErrors":[],"proxyAddresses":["SMTP:v-kaisun@microsoft.com"],"refreshTokensValidFromDateTime":"2021-05-28T09:30:27Z","showInAddressList":false,"signInNames":[],"sipProxyAddress":null,"state":null,"streetAddress":null,"surname":"Sun","telephoneNumber":null,"thumbnailPhoto@odata.mediaEditLink":"directoryObjects/b9c6016b-2e30-45fa-964e-414f0fc9272a/Microsoft.DirectoryServices.User/thumbnailPhoto","usageLocation":null,"userIdentities":[],"userPrincipalName":"v-kaisun_microsoft.com#EXT#@mpliftrconfluent20210809out.onmicrosoft.com","userState":"Accepted","userStateChangedOn":"2021-07-05T05:41:25Z","userType":"Member"}]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '1751' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Tue, 06 Jul 2021 09:17:28 GMT + duration: + - '2634527' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - Ok3Y/RhppyyfWueM1N/r26Om6oVKqYdulVw1ZYEtMeo= + ocp-aad-session-key: + - 4VTH9HmmtvytRVyihIyy0NwxTKH-la5DG5uhK6jbkLH8L_9cBYUhlG5ElAXOnXcIGzUhRYB0xsewa7vLVc0KcjBOV6RCvliN1AqYiU6y_4_48g7akNo6wsyQWjJhKmbl.5vFl5x7UB7ZmjCgxLFRYLtEXhsgU_YlCS_wYyAX-t3E + pragma: + - no-cache + request-id: + - 7a2e142f-b45e-4c8c-857e-a994df6ad039 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-ms-resource-unit: + - '3' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.26.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments?$filter=atScope%28%29%20and%20assignedTo%28%27b9c6016b-2e30-45fa-964e-414f0fc9272a%27%29&api-version=2020-04-01-preview + response: + body: + string: '{"value":[{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"b9c6016b-2e30-45fa-964e-414f0fc9272a","principalType":"User","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2021-05-28T09:31:07.8102180Z","updatedOn":"2021-05-28T09:31:07.8102180Z","createdBy":"a9cb2b23-249d-4efa-af64-d7cbe600eae1","updatedBy":"a9cb2b23-249d-4efa-af64-d7cbe600eae1","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/85f02850-c7ee-4da6-9a5f-9f46ecda3aa7","type":"Microsoft.Authorization/roleAssignments","name":"85f02850-c7ee-4da6-9a5f-9f46ecda3aa7"}]}' + headers: + cache-control: + - no-cache + content-length: + - '857' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:17:28 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + Cookie: + - x-ms-gateway-slice=Production + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.26.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Contributor%27&api-version=2018-01-01-preview + response: + body: + string: '{"value":[{"properties":{"roleName":"Contributor","type":"BuiltInRole","description":"Grants + full access to manage all resources, but does not allow you to assign roles + in Azure RBAC, manage assignments in Azure Blueprints, or share image galleries.","assignableScopes":["/"],"permissions":[{"actions":["*"],"notActions":["Microsoft.Authorization/*/Delete","Microsoft.Authorization/*/Write","Microsoft.Authorization/elevateAccess/Action","Microsoft.Blueprint/blueprintAssignments/write","Microsoft.Blueprint/blueprintAssignments/delete","Microsoft.Compute/galleries/share/action"],"dataActions":[],"notDataActions":[]}],"createdOn":"2015-02-02T21:55:09.8806423Z","updatedOn":"2020-12-04T00:34:54.8501087Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","type":"Microsoft.Authorization/roleDefinitions","name":"b24988ac-6180-42a0-ab88-20f7382dd24c"}]}' + headers: + cache-control: + - no-cache + content-length: + - '984' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:17:28 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + Cookie: + - x-ms-gateway-slice=Production + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.26.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions?api-version=2018-01-01-preview + response: + body: + string: "{\"value\":[{\"properties\":{\"roleName\":\"AcrPush\",\"type\":\"BuiltInRole\",\"description\":\"acr + push\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ContainerRegistry/registries/pull/read\",\"Microsoft.ContainerRegistry/registries/push/write\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-10-29T17:52:32.5201177Z\",\"updatedOn\":\"2018-11-13T23:26:19.9749249Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8311e382-0749-4cb8-b61a-304f252e45ec\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"8311e382-0749-4cb8-b61a-304f252e45ec\"},{\"properties\":{\"roleName\":\"API + Management Service Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Can + manage service and the APIs\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ApiManagement/service/*\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8650193Z\",\"updatedOn\":\"2019-02-05T21:24:17.7502607Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/312a565d-c81f-4fd8-895a-4e21e48d571c\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"312a565d-c81f-4fd8-895a-4e21e48d571c\"},{\"properties\":{\"roleName\":\"AcrPull\",\"type\":\"BuiltInRole\",\"description\":\"acr + pull\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ContainerRegistry/registries/pull/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-10-22T19:01:56.8227182Z\",\"updatedOn\":\"2018-11-13T23:22:03.2302457Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/7f951dda-4ed3-4680-a7ca-43fe172d538d\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"7f951dda-4ed3-4680-a7ca-43fe172d538d\"},{\"properties\":{\"roleName\":\"AcrImageSigner\",\"type\":\"BuiltInRole\",\"description\":\"acr + image signer\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ContainerRegistry/registries/sign/write\"],\"notActions\":[],\"dataActions\":[\"Microsoft.ContainerRegistry/registries/trustedCollections/write\"],\"notDataActions\":[]}],\"createdOn\":\"2018-03-15T23:23:08.4038322Z\",\"updatedOn\":\"2021-06-23T21:07:39.6776759Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/6cef56e8-d556-48e5-a04f-b8e64114680f\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"6cef56e8-d556-48e5-a04f-b8e64114680f\"},{\"properties\":{\"roleName\":\"AcrDelete\",\"type\":\"BuiltInRole\",\"description\":\"acr + delete\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ContainerRegistry/registries/artifacts/delete\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-03-11T20:19:31.6682804Z\",\"updatedOn\":\"2019-03-11T20:24:38.9845104Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"c2f4ef07-c644-48eb-af81-4b1b4947fb11\"},{\"properties\":{\"roleName\":\"AcrQuarantineReader\",\"type\":\"BuiltInRole\",\"description\":\"acr + quarantine data reader\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ContainerRegistry/registries/quarantine/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.ContainerRegistry/registries/quarantinedArtifacts/read\"],\"notDataActions\":[]}],\"createdOn\":\"2018-03-16T00:27:39.9596835Z\",\"updatedOn\":\"2021-06-23T21:17:58.7569846Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/cdda3590-29a3-44f6-95f2-9f980659eb04\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"cdda3590-29a3-44f6-95f2-9f980659eb04\"},{\"properties\":{\"roleName\":\"AcrQuarantineWriter\",\"type\":\"BuiltInRole\",\"description\":\"acr + quarantine data writer\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ContainerRegistry/registries/quarantine/read\",\"Microsoft.ContainerRegistry/registries/quarantine/write\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-03-16T00:26:37.5871820Z\",\"updatedOn\":\"2019-10-22T00:10:29.8202164Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"c8d4ff99-41c3-41a8-9f60-21dfdad59608\"},{\"properties\":{\"roleName\":\"API + Management Service Operator Role\",\"type\":\"BuiltInRole\",\"description\":\"Can + manage service but not the APIs\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ApiManagement/service/*/read\",\"Microsoft.ApiManagement/service/backup/action\",\"Microsoft.ApiManagement/service/delete\",\"Microsoft.ApiManagement/service/managedeployments/action\",\"Microsoft.ApiManagement/service/read\",\"Microsoft.ApiManagement/service/restore/action\",\"Microsoft.ApiManagement/service/updatecertificate/action\",\"Microsoft.ApiManagement/service/updatehostname/action\",\"Microsoft.ApiManagement/service/write\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[\"Microsoft.ApiManagement/service/users/keys/read\"],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2016-11-09T00:03:42.1194019Z\",\"updatedOn\":\"2016-11-18T23:56:25.4682649Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/e022efe7-f5ba-4159-bbe4-b44f577e9b61\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"e022efe7-f5ba-4159-bbe4-b44f577e9b61\"},{\"properties\":{\"roleName\":\"API + Management Service Reader Role\",\"type\":\"BuiltInRole\",\"description\":\"Read-only + access to service and APIs\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ApiManagement/service/*/read\",\"Microsoft.ApiManagement/service/read\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[\"Microsoft.ApiManagement/service/users/keys/read\"],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2016-11-09T00:26:45.1540473Z\",\"updatedOn\":\"2017-01-23T23:10:34.8876776Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/71522526-b88f-4d52-b57f-d31fc3546d0d\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"71522526-b88f-4d52-b57f-d31fc3546d0d\"},{\"properties\":{\"roleName\":\"Application + Insights Component Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Can + manage Application Insights components\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Insights/generateLiveToken/read\",\"Microsoft.Insights/metricAlerts/*\",\"Microsoft.Insights/components/*\",\"Microsoft.Insights/scheduledqueryrules/*\",\"Microsoft.Insights/topology/read\",\"Microsoft.Insights/transactions/read\",\"Microsoft.Insights/webtests/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2021-01-19T19:26:12.8117169Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/ae349356-3a1b-4a5e-921d-050484c6347e\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"ae349356-3a1b-4a5e-921d-050484c6347e\"},{\"properties\":{\"roleName\":\"Application + Insights Snapshot Debugger\",\"type\":\"BuiltInRole\",\"description\":\"Gives + user permission to use Application Insights Snapshot Debugger features\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Insights/components/*/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-04-19T21:25:12.3728747Z\",\"updatedOn\":\"2017-04-19T23:34:59.9511581Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/08954f03-6346-4c2e-81c0-ec3a5cfae23b\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"08954f03-6346-4c2e-81c0-ec3a5cfae23b\"},{\"properties\":{\"roleName\":\"Attestation + Reader\",\"type\":\"BuiltInRole\",\"description\":\"Can read the attestation + provider properties\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Attestation/attestationProviders/attestation/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-03-25T19:42:59.1576710Z\",\"updatedOn\":\"2019-05-10T17:52:38.9036953Z\",\"createdBy\":null,\"updatedBy\":\"SYSTEM\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/fd1bd22b-8476-40bc-a0bc-69b95687b9f3\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"fd1bd22b-8476-40bc-a0bc-69b95687b9f3\"},{\"properties\":{\"roleName\":\"Automation + Job Operator\",\"type\":\"BuiltInRole\",\"description\":\"Create and Manage + Jobs using Automation Runbooks.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Automation/automationAccounts/hybridRunbookWorkerGroups/read\",\"Microsoft.Automation/automationAccounts/jobs/read\",\"Microsoft.Automation/automationAccounts/jobs/resume/action\",\"Microsoft.Automation/automationAccounts/jobs/stop/action\",\"Microsoft.Automation/automationAccounts/jobs/streams/read\",\"Microsoft.Automation/automationAccounts/jobs/suspend/action\",\"Microsoft.Automation/automationAccounts/jobs/write\",\"Microsoft.Automation/automationAccounts/jobs/output/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-04-19T20:52:41.0020018Z\",\"updatedOn\":\"2018-08-14T22:08:48.1147327Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4fe576fe-1146-4730-92eb-48519fa6bf9f\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"4fe576fe-1146-4730-92eb-48519fa6bf9f\"},{\"properties\":{\"roleName\":\"Automation + Runbook Operator\",\"type\":\"BuiltInRole\",\"description\":\"Read Runbook + properties - to be able to create Jobs of the runbook.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Automation/automationAccounts/runbooks/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-04-19T20:47:49.5640674Z\",\"updatedOn\":\"2017-04-25T01:00:45.6444999Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/5fb5aef8-1081-4b8e-bb16-9d5d0385bab5\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"5fb5aef8-1081-4b8e-bb16-9d5d0385bab5\"},{\"properties\":{\"roleName\":\"Automation + Operator\",\"type\":\"BuiltInRole\",\"description\":\"Automation Operators + are able to start, stop, suspend, and resume jobs\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Automation/automationAccounts/hybridRunbookWorkerGroups/read\",\"Microsoft.Automation/automationAccounts/jobs/read\",\"Microsoft.Automation/automationAccounts/jobs/resume/action\",\"Microsoft.Automation/automationAccounts/jobs/stop/action\",\"Microsoft.Automation/automationAccounts/jobs/streams/read\",\"Microsoft.Automation/automationAccounts/jobs/suspend/action\",\"Microsoft.Automation/automationAccounts/jobs/write\",\"Microsoft.Automation/automationAccounts/jobSchedules/read\",\"Microsoft.Automation/automationAccounts/jobSchedules/write\",\"Microsoft.Automation/automationAccounts/linkedWorkspace/read\",\"Microsoft.Automation/automationAccounts/read\",\"Microsoft.Automation/automationAccounts/runbooks/read\",\"Microsoft.Automation/automationAccounts/schedules/read\",\"Microsoft.Automation/automationAccounts/schedules/write\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Automation/automationAccounts/jobs/output/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-08-18T01:05:03.3916130Z\",\"updatedOn\":\"2018-05-10T20:12:39.6978200Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/d3881f73-407a-4167-8283-e981cbba0404\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"d3881f73-407a-4167-8283-e981cbba0404\"},{\"properties\":{\"roleName\":\"Avere + Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Can create and manage + an Avere vFXT cluster.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Compute/*/read\",\"Microsoft.Compute/availabilitySets/*\",\"Microsoft.Compute/proximityPlacementGroups/*\",\"Microsoft.Compute/virtualMachines/*\",\"Microsoft.Compute/disks/*\",\"Microsoft.Network/*/read\",\"Microsoft.Network/networkInterfaces/*\",\"Microsoft.Network/virtualNetworks/read\",\"Microsoft.Network/virtualNetworks/subnets/read\",\"Microsoft.Network/virtualNetworks/subnets/join/action\",\"Microsoft.Network/virtualNetworks/subnets/joinViaServiceEndpoint/action\",\"Microsoft.Network/networkSecurityGroups/join/action\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Storage/*/read\",\"Microsoft.Storage/storageAccounts/*\",\"Microsoft.Support/*\",\"Microsoft.Resources/subscriptions/resourceGroups/resources/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/delete\",\"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read\",\"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write\"],\"notDataActions\":[]}],\"createdOn\":\"2019-03-18T20:00:58.9207889Z\",\"updatedOn\":\"2020-05-27T06:48:54.4896867Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4f8fab4f-1852-4a58-a46a-8eaf358af14a\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"4f8fab4f-1852-4a58-a46a-8eaf358af14a\"},{\"properties\":{\"roleName\":\"Avere + Operator\",\"type\":\"BuiltInRole\",\"description\":\"Used by the Avere vFXT + cluster to manage the cluster\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Compute/virtualMachines/read\",\"Microsoft.Network/networkInterfaces/read\",\"Microsoft.Network/networkInterfaces/write\",\"Microsoft.Network/virtualNetworks/read\",\"Microsoft.Network/virtualNetworks/subnets/read\",\"Microsoft.Network/virtualNetworks/subnets/join/action\",\"Microsoft.Network/networkSecurityGroups/join/action\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Storage/storageAccounts/blobServices/containers/delete\",\"Microsoft.Storage/storageAccounts/blobServices/containers/read\",\"Microsoft.Storage/storageAccounts/blobServices/containers/write\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/delete\",\"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read\",\"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write\"],\"notDataActions\":[]}],\"createdOn\":\"2019-03-18T20:02:38.3399857Z\",\"updatedOn\":\"2019-03-29T00:26:37.9205875Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/c025889f-8102-4ebf-b32c-fc0c6f0c6bd9\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"c025889f-8102-4ebf-b32c-fc0c6f0c6bd9\"},{\"properties\":{\"roleName\":\"Azure + Kubernetes Service Cluster Admin Role\",\"type\":\"BuiltInRole\",\"description\":\"List + cluster admin credential action.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ContainerService/managedClusters/listClusterAdminCredential/action\",\"Microsoft.ContainerService/managedClusters/accessProfiles/listCredential/action\",\"Microsoft.ContainerService/managedClusters/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-08-15T21:38:18.5953853Z\",\"updatedOn\":\"2020-08-10T21:30:17.4985976Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/0ab0b1a8-8aac-4efd-b8c2-3ee1fb270be8\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"0ab0b1a8-8aac-4efd-b8c2-3ee1fb270be8\"},{\"properties\":{\"roleName\":\"Azure + Kubernetes Service Cluster User Role\",\"type\":\"BuiltInRole\",\"description\":\"List + cluster user credential action.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ContainerService/managedClusters/listClusterUserCredential/action\",\"Microsoft.ContainerService/managedClusters/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-08-15T22:04:53.4037241Z\",\"updatedOn\":\"2020-08-10T23:33:17.4901670Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4abbcc35-e782-43d8-92c5-2d3f1bd2253f\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"4abbcc35-e782-43d8-92c5-2d3f1bd2253f\"},{\"properties\":{\"roleName\":\"Azure + Maps Data Reader\",\"type\":\"BuiltInRole\",\"description\":\"Grants access + to read map related data from an Azure maps account.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Maps/accounts/*/read\"],\"notDataActions\":[]}],\"createdOn\":\"2018-10-05T19:47:03.4723070Z\",\"updatedOn\":\"2020-04-28T22:33:41.7780319Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/423170ca-a8f6-4b0f-8487-9e4eb8f49bfa\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"423170ca-a8f6-4b0f-8487-9e4eb8f49bfa\"},{\"properties\":{\"roleName\":\"Azure + Stack Registration Owner\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you manage Azure Stack registrations.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.AzureStack/edgeSubscriptions/read\",\"Microsoft.AzureStack/registrations/products/*/action\",\"Microsoft.AzureStack/registrations/products/read\",\"Microsoft.AzureStack/registrations/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-11-13T23:42:06.2161827Z\",\"updatedOn\":\"2020-06-29T22:11:17.0759529Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/6f12a6df-dd06-4f3e-bcb1-ce8be600526a\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"6f12a6df-dd06-4f3e-bcb1-ce8be600526a\"},{\"properties\":{\"roleName\":\"Backup + Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage backup + service,but can't create vaults and give access to others\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Network/virtualNetworks/read\",\"Microsoft.RecoveryServices/locations/*\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/operationResults/*\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/*\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/refreshContainers/action\",\"Microsoft.RecoveryServices/Vaults/backupJobs/*\",\"Microsoft.RecoveryServices/Vaults/backupJobsExport/action\",\"Microsoft.RecoveryServices/Vaults/backupOperationResults/*\",\"Microsoft.RecoveryServices/Vaults/backupPolicies/*\",\"Microsoft.RecoveryServices/Vaults/backupProtectableItems/*\",\"Microsoft.RecoveryServices/Vaults/backupProtectedItems/*\",\"Microsoft.RecoveryServices/Vaults/backupProtectionContainers/*\",\"Microsoft.RecoveryServices/Vaults/backupSecurityPIN/*\",\"Microsoft.RecoveryServices/Vaults/backupUsageSummaries/read\",\"Microsoft.RecoveryServices/Vaults/certificates/*\",\"Microsoft.RecoveryServices/Vaults/extendedInformation/*\",\"Microsoft.RecoveryServices/Vaults/monitoringAlerts/read\",\"Microsoft.RecoveryServices/Vaults/monitoringConfigurations/*\",\"Microsoft.RecoveryServices/Vaults/read\",\"Microsoft.RecoveryServices/Vaults/registeredIdentities/*\",\"Microsoft.RecoveryServices/Vaults/usages/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Storage/storageAccounts/read\",\"Microsoft.RecoveryServices/Vaults/backupstorageconfig/*\",\"Microsoft.RecoveryServices/Vaults/backupconfig/*\",\"Microsoft.RecoveryServices/Vaults/backupValidateOperation/action\",\"Microsoft.RecoveryServices/Vaults/write\",\"Microsoft.RecoveryServices/Vaults/backupOperations/read\",\"Microsoft.RecoveryServices/Vaults/backupEngines/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/backupProtectionIntent/*\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectableContainers/read\",\"Microsoft.RecoveryServices/locations/backupStatus/action\",\"Microsoft.RecoveryServices/locations/backupPreValidateProtection/action\",\"Microsoft.RecoveryServices/locations/backupValidateFeatures/action\",\"Microsoft.RecoveryServices/Vaults/monitoringAlerts/write\",\"Microsoft.RecoveryServices/operations/read\",\"Microsoft.RecoveryServices/locations/operationStatus/read\",\"Microsoft.RecoveryServices/Vaults/backupProtectionIntents/read\",\"Microsoft.Support/*\",\"Microsoft.DataProtection/locations/getBackupStatus/action\",\"Microsoft.DataProtection/backupVaults/backupInstances/write\",\"Microsoft.DataProtection/backupVaults/backupInstances/delete\",\"Microsoft.DataProtection/backupVaults/backupInstances/read\",\"Microsoft.DataProtection/backupVaults/backupInstances/read\",\"Microsoft.DataProtection/backupVaults/backupInstances/backup/action\",\"Microsoft.DataProtection/backupVaults/backupInstances/validateRestore/action\",\"Microsoft.DataProtection/backupVaults/backupInstances/restore/action\",\"Microsoft.DataProtection/backupVaults/backupPolicies/write\",\"Microsoft.DataProtection/backupVaults/backupPolicies/delete\",\"Microsoft.DataProtection/backupVaults/backupPolicies/read\",\"Microsoft.DataProtection/backupVaults/backupPolicies/read\",\"Microsoft.DataProtection/backupVaults/backupInstances/recoveryPoints/read\",\"Microsoft.DataProtection/backupVaults/backupInstances/recoveryPoints/read\",\"Microsoft.DataProtection/backupVaults/backupInstances/findRestorableTimeRanges/action\",\"Microsoft.DataProtection/backupVaults/write\",\"Microsoft.DataProtection/backupVaults/read\",\"Microsoft.DataProtection/backupVaults/operationResults/read\",\"Microsoft.DataProtection/locations/checkNameAvailability/action\",\"Microsoft.DataProtection/backupVaults/read\",\"Microsoft.DataProtection/backupVaults/read\",\"Microsoft.DataProtection/locations/operationStatus/read\",\"Microsoft.DataProtection/locations/operationResults/read\",\"Microsoft.DataProtection/backupVaults/validateForBackup/action\",\"Microsoft.DataProtection/providers/operations/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-01-03T13:12:15.7321344Z\",\"updatedOn\":\"2021-06-14T09:45:09.5641727Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/5e467623-bb1f-42f4-a55d-6e525e11384b\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"5e467623-bb1f-42f4-a55d-6e525e11384b\"},{\"properties\":{\"roleName\":\"Billing + Reader\",\"type\":\"BuiltInRole\",\"description\":\"Allows read access to + billing data\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Billing/*/read\",\"Microsoft.Commerce/*/read\",\"Microsoft.Consumption/*/read\",\"Microsoft.Management/managementGroups/read\",\"Microsoft.CostManagement/*/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-04-25T02:13:38.9054151Z\",\"updatedOn\":\"2018-09-26T17:45:09.2227236Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/fa23ad8b-c56e-40d8-ac0c-ce449e1d2c64\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"fa23ad8b-c56e-40d8-ac0c-ce449e1d2c64\"},{\"properties\":{\"roleName\":\"Backup + Operator\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage backup + services, except removal of backup, vault creation and giving access to others\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Network/virtualNetworks/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/operationResults/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/operationResults/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/backup/action\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/operationResults/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/operationsStatus/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/provisionInstantItemRecovery/action\",\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/accessToken/action\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/restore/action\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/revokeInstantItemRecovery/action\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/write\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/refreshContainers/action\",\"Microsoft.RecoveryServices/Vaults/backupJobs/*\",\"Microsoft.RecoveryServices/Vaults/backupJobsExport/action\",\"Microsoft.RecoveryServices/Vaults/backupOperationResults/*\",\"Microsoft.RecoveryServices/Vaults/backupPolicies/operationResults/read\",\"Microsoft.RecoveryServices/Vaults/backupPolicies/read\",\"Microsoft.RecoveryServices/Vaults/backupProtectableItems/*\",\"Microsoft.RecoveryServices/Vaults/backupProtectedItems/read\",\"Microsoft.RecoveryServices/Vaults/backupProtectionContainers/read\",\"Microsoft.RecoveryServices/Vaults/backupUsageSummaries/read\",\"Microsoft.RecoveryServices/Vaults/certificates/write\",\"Microsoft.RecoveryServices/Vaults/extendedInformation/read\",\"Microsoft.RecoveryServices/Vaults/extendedInformation/write\",\"Microsoft.RecoveryServices/Vaults/monitoringAlerts/read\",\"Microsoft.RecoveryServices/Vaults/monitoringConfigurations/*\",\"Microsoft.RecoveryServices/Vaults/read\",\"Microsoft.RecoveryServices/Vaults/registeredIdentities/operationResults/read\",\"Microsoft.RecoveryServices/Vaults/registeredIdentities/read\",\"Microsoft.RecoveryServices/Vaults/registeredIdentities/write\",\"Microsoft.RecoveryServices/Vaults/usages/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Storage/storageAccounts/read\",\"Microsoft.RecoveryServices/Vaults/backupstorageconfig/*\",\"Microsoft.RecoveryServices/Vaults/backupValidateOperation/action\",\"Microsoft.RecoveryServices/Vaults/backupOperations/read\",\"Microsoft.RecoveryServices/Vaults/backupPolicies/operations/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/write\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/inquire/action\",\"Microsoft.RecoveryServices/Vaults/backupEngines/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/backupProtectionIntent/write\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/backupProtectionIntent/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectableContainers/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/items/read\",\"Microsoft.RecoveryServices/locations/backupStatus/action\",\"Microsoft.RecoveryServices/locations/backupPreValidateProtection/action\",\"Microsoft.RecoveryServices/locations/backupValidateFeatures/action\",\"Microsoft.RecoveryServices/locations/backupAadProperties/read\",\"Microsoft.RecoveryServices/locations/backupCrrJobs/action\",\"Microsoft.RecoveryServices/locations/backupCrrJob/action\",\"Microsoft.RecoveryServices/locations/backupCrossRegionRestore/action\",\"Microsoft.RecoveryServices/locations/backupCrrOperationResults/read\",\"Microsoft.RecoveryServices/locations/backupCrrOperationsStatus/read\",\"Microsoft.RecoveryServices/Vaults/monitoringAlerts/write\",\"Microsoft.RecoveryServices/operations/read\",\"Microsoft.RecoveryServices/locations/operationStatus/read\",\"Microsoft.RecoveryServices/Vaults/backupProtectionIntents/read\",\"Microsoft.Support/*\",\"Microsoft.DataProtection/backupVaults/backupInstances/read\",\"Microsoft.DataProtection/backupVaults/backupInstances/read\",\"Microsoft.DataProtection/backupVaults/backupPolicies/read\",\"Microsoft.DataProtection/backupVaults/backupPolicies/read\",\"Microsoft.DataProtection/backupVaults/backupInstances/recoveryPoints/read\",\"Microsoft.DataProtection/backupVaults/backupInstances/recoveryPoints/read\",\"Microsoft.DataProtection/backupVaults/backupInstances/findRestorableTimeRanges/action\",\"Microsoft.DataProtection/backupVaults/read\",\"Microsoft.DataProtection/backupVaults/operationResults/read\",\"Microsoft.DataProtection/backupVaults/read\",\"Microsoft.DataProtection/backupVaults/read\",\"Microsoft.DataProtection/locations/operationStatus/read\",\"Microsoft.DataProtection/locations/operationResults/read\",\"Microsoft.DataProtection/providers/operations/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-01-03T13:21:11.8947640Z\",\"updatedOn\":\"2021-06-14T09:44:30.3420995Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/00c29273-979b-4161-815c-10b084fb9324\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"00c29273-979b-4161-815c-10b084fb9324\"},{\"properties\":{\"roleName\":\"Backup + Reader\",\"type\":\"BuiltInRole\",\"description\":\"Can view backup services, + but can't make changes\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.RecoveryServices/locations/allocatedStamp/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/operationResults/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/operationResults/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/operationResults/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/operationsStatus/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/read\",\"Microsoft.RecoveryServices/Vaults/backupJobs/operationResults/read\",\"Microsoft.RecoveryServices/Vaults/backupJobs/read\",\"Microsoft.RecoveryServices/Vaults/backupJobsExport/action\",\"Microsoft.RecoveryServices/Vaults/backupOperationResults/read\",\"Microsoft.RecoveryServices/Vaults/backupPolicies/operationResults/read\",\"Microsoft.RecoveryServices/Vaults/backupPolicies/read\",\"Microsoft.RecoveryServices/Vaults/backupProtectedItems/read\",\"Microsoft.RecoveryServices/Vaults/backupProtectionContainers/read\",\"Microsoft.RecoveryServices/Vaults/backupUsageSummaries/read\",\"Microsoft.RecoveryServices/Vaults/extendedInformation/read\",\"Microsoft.RecoveryServices/Vaults/monitoringAlerts/read\",\"Microsoft.RecoveryServices/Vaults/read\",\"Microsoft.RecoveryServices/Vaults/registeredIdentities/operationResults/read\",\"Microsoft.RecoveryServices/Vaults/registeredIdentities/read\",\"Microsoft.RecoveryServices/Vaults/backupstorageconfig/read\",\"Microsoft.RecoveryServices/Vaults/backupconfig/read\",\"Microsoft.RecoveryServices/Vaults/backupOperations/read\",\"Microsoft.RecoveryServices/Vaults/backupPolicies/operations/read\",\"Microsoft.RecoveryServices/Vaults/backupEngines/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/backupProtectionIntent/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/items/read\",\"Microsoft.RecoveryServices/locations/backupStatus/action\",\"Microsoft.RecoveryServices/Vaults/monitoringConfigurations/*\",\"Microsoft.RecoveryServices/Vaults/monitoringAlerts/write\",\"Microsoft.RecoveryServices/operations/read\",\"Microsoft.RecoveryServices/locations/operationStatus/read\",\"Microsoft.RecoveryServices/Vaults/backupProtectionIntents/read\",\"Microsoft.RecoveryServices/Vaults/usages/read\",\"Microsoft.RecoveryServices/locations/backupValidateFeatures/action\",\"Microsoft.RecoveryServices/locations/backupCrrJobs/action\",\"Microsoft.RecoveryServices/locations/backupCrrJob/action\",\"Microsoft.RecoveryServices/locations/backupCrrOperationResults/read\",\"Microsoft.RecoveryServices/locations/backupCrrOperationsStatus/read\",\"Microsoft.DataProtection/locations/getBackupStatus/action\",\"Microsoft.DataProtection/backupVaults/backupInstances/write\",\"Microsoft.DataProtection/backupVaults/backupInstances/read\",\"Microsoft.DataProtection/backupVaults/backupInstances/read\",\"Microsoft.DataProtection/backupVaults/backupInstances/backup/action\",\"Microsoft.DataProtection/backupVaults/backupInstances/validateRestore/action\",\"Microsoft.DataProtection/backupVaults/backupInstances/restore/action\",\"Microsoft.DataProtection/backupVaults/backupPolicies/read\",\"Microsoft.DataProtection/backupVaults/backupPolicies/read\",\"Microsoft.DataProtection/backupVaults/backupInstances/recoveryPoints/read\",\"Microsoft.DataProtection/backupVaults/backupInstances/recoveryPoints/read\",\"Microsoft.DataProtection/backupVaults/backupInstances/findRestorableTimeRanges/action\",\"Microsoft.DataProtection/backupVaults/read\",\"Microsoft.DataProtection/backupVaults/operationResults/read\",\"Microsoft.DataProtection/backupVaults/read\",\"Microsoft.DataProtection/backupVaults/read\",\"Microsoft.DataProtection/locations/operationStatus/read\",\"Microsoft.DataProtection/locations/operationResults/read\",\"Microsoft.DataProtection/backupVaults/validateForBackup/action\",\"Microsoft.DataProtection/providers/operations/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-01-03T13:18:41.3893065Z\",\"updatedOn\":\"2021-06-10T06:11:04.3823975Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/a795c7a0-d4a2-40c1-ae25-d81f01202912\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"a795c7a0-d4a2-40c1-ae25-d81f01202912\"},{\"properties\":{\"roleName\":\"Blockchain + Member Node Access (Preview)\",\"type\":\"BuiltInRole\",\"description\":\"Allows + for access to Blockchain Member nodes\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Blockchain/blockchainMembers/transactionNodes/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Blockchain/blockchainMembers/transactionNodes/connect/action\"],\"notDataActions\":[]}],\"createdOn\":\"2018-12-21T10:33:01.9604839Z\",\"updatedOn\":\"2018-12-21T10:33:58.0042162Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/31a002a1-acaf-453e-8a5b-297c9ca1ea24\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"31a002a1-acaf-453e-8a5b-297c9ca1ea24\"},{\"properties\":{\"roleName\":\"BizTalk + Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage BizTalk + services, but not access to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.BizTalkServices/BizTalk/*\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2019-02-05T20:42:18.8978210Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/5e3c6656-6cfa-4708-81fe-0de47ac73342\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"5e3c6656-6cfa-4708-81fe-0de47ac73342\"},{\"properties\":{\"roleName\":\"CDN + Endpoint Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Can manage + CDN endpoints, but can\u2019t grant access to other users.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Cdn/edgenodes/read\",\"Microsoft.Cdn/operationresults/*\",\"Microsoft.Cdn/profiles/endpoints/*\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2016-01-23T02:48:46.4996252Z\",\"updatedOn\":\"2016-05-31T23:13:52.6231539Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/426e0c7f-0c7e-4658-b36f-ff54d6c29b45\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"426e0c7f-0c7e-4658-b36f-ff54d6c29b45\"},{\"properties\":{\"roleName\":\"CDN + Endpoint Reader\",\"type\":\"BuiltInRole\",\"description\":\"Can view CDN + endpoints, but can\u2019t make changes.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Cdn/edgenodes/read\",\"Microsoft.Cdn/operationresults/*\",\"Microsoft.Cdn/profiles/endpoints/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2016-01-23T02:48:46.4996252Z\",\"updatedOn\":\"2016-05-31T23:13:53.1585846Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/871e35f6-b5c1-49cc-a043-bde969a0f2cd\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"871e35f6-b5c1-49cc-a043-bde969a0f2cd\"},{\"properties\":{\"roleName\":\"CDN + Profile Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Can manage + CDN profiles and their endpoints, but can\u2019t grant access to other users.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Cdn/edgenodes/read\",\"Microsoft.Cdn/operationresults/*\",\"Microsoft.Cdn/profiles/*\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2016-01-23T02:48:46.4996252Z\",\"updatedOn\":\"2016-05-31T23:13:53.7051278Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/ec156ff8-a8d1-4d15-830c-5b80698ca432\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"ec156ff8-a8d1-4d15-830c-5b80698ca432\"},{\"properties\":{\"roleName\":\"CDN + Profile Reader\",\"type\":\"BuiltInRole\",\"description\":\"Can view CDN profiles + and their endpoints, but can\u2019t make changes.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Cdn/edgenodes/read\",\"Microsoft.Cdn/operationresults/*\",\"Microsoft.Cdn/profiles/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2016-01-23T02:48:46.4996252Z\",\"updatedOn\":\"2016-05-31T23:13:54.2283001Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8f96442b-4075-438f-813d-ad51ab4019af\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"8f96442b-4075-438f-813d-ad51ab4019af\"},{\"properties\":{\"roleName\":\"Classic + Network Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + manage classic networks, but not access to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.ClassicNetwork/*\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2019-02-05T21:24:39.7576926Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b34d265f-36f7-4a0d-a4d4-e158ca92e90f\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b34d265f-36f7-4a0d-a4d4-e158ca92e90f\"},{\"properties\":{\"roleName\":\"Classic + Storage Account Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you manage classic storage accounts, but not access to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.ClassicStorage/storageAccounts/*\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2019-02-05T21:24:30.8964641Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/86e8f5dc-a6e9-4c67-9d15-de283e8eac25\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"86e8f5dc-a6e9-4c67-9d15-de283e8eac25\"},{\"properties\":{\"roleName\":\"Classic + Storage Account Key Operator Service Role\",\"type\":\"BuiltInRole\",\"description\":\"Classic + Storage Account Key Operators are allowed to list and regenerate keys on Classic + Storage Accounts\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ClassicStorage/storageAccounts/listkeys/action\",\"Microsoft.ClassicStorage/storageAccounts/regeneratekey/action\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-04-13T18:22:52.1461100Z\",\"updatedOn\":\"2017-04-13T20:54:03.0505986Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/985d6b00-f706-48f5-a6fe-d0ca12fb668d\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"985d6b00-f706-48f5-a6fe-d0ca12fb668d\"},{\"properties\":{\"roleName\":\"ClearDB + MySQL DB Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + manage ClearDB MySQL databases, but not access to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"successbricks.cleardb/databases/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2019-02-05T20:42:23.2893077Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9106cda0-8a86-4e81-b686-29a22c54effe\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"9106cda0-8a86-4e81-b686-29a22c54effe\"},{\"properties\":{\"roleName\":\"Classic + Virtual Machine Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you manage classic virtual machines, but not access to them, and not the virtual + network or storage account they\u2019re connected to.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.ClassicCompute/domainNames/*\",\"Microsoft.ClassicCompute/virtualMachines/*\",\"Microsoft.ClassicNetwork/networkSecurityGroups/join/action\",\"Microsoft.ClassicNetwork/reservedIps/link/action\",\"Microsoft.ClassicNetwork/reservedIps/read\",\"Microsoft.ClassicNetwork/virtualNetworks/join/action\",\"Microsoft.ClassicNetwork/virtualNetworks/read\",\"Microsoft.ClassicStorage/storageAccounts/disks/read\",\"Microsoft.ClassicStorage/storageAccounts/images/read\",\"Microsoft.ClassicStorage/storageAccounts/listKeys/action\",\"Microsoft.ClassicStorage/storageAccounts/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-04-25T00:37:56.5416086Z\",\"updatedOn\":\"2019-02-05T21:24:43.0770473Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/d73bb868-a0df-4d4d-bd69-98a00b01fccb\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"d73bb868-a0df-4d4d-bd69-98a00b01fccb\"},{\"properties\":{\"roleName\":\"Cognitive + Services User\",\"type\":\"BuiltInRole\",\"description\":\"Lets you read and + list keys of Cognitive Services.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.CognitiveServices/*/read\",\"Microsoft.CognitiveServices/accounts/listkeys/action\",\"Microsoft.Insights/alertRules/read\",\"Microsoft.Insights/diagnosticSettings/read\",\"Microsoft.Insights/logDefinitions/read\",\"Microsoft.Insights/metricdefinitions/read\",\"Microsoft.Insights/metrics/read\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/operations/read\",\"Microsoft.Resources/subscriptions/operationresults/read\",\"Microsoft.Resources/subscriptions/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[\"Microsoft.CognitiveServices/*\"],\"notDataActions\":[]}],\"createdOn\":\"2018-08-08T23:23:43.7701274Z\",\"updatedOn\":\"2019-02-13T19:53:56.7209248Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/a97b65f3-24c7-4388-baec-2e87135dc908\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"a97b65f3-24c7-4388-baec-2e87135dc908\"},{\"properties\":{\"roleName\":\"Cognitive + Services Data Reader (Preview)\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you read Cognitive Services data.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.CognitiveServices/*/read\"],\"notDataActions\":[]}],\"createdOn\":\"2019-02-13T20:02:12.6849986Z\",\"updatedOn\":\"2019-02-13T22:53:55.1675290Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b59867f0-fa02-499b-be73-45a86b5b3e1c\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b59867f0-fa02-499b-be73-45a86b5b3e1c\"},{\"properties\":{\"roleName\":\"Cognitive + Services Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + create, read, update, delete and manage keys of Cognitive Services.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.CognitiveServices/*\",\"Microsoft.Features/features/read\",\"Microsoft.Features/providers/features/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Insights/diagnosticSettings/*\",\"Microsoft.Insights/logDefinitions/read\",\"Microsoft.Insights/metricdefinitions/read\",\"Microsoft.Insights/metrics/read\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/deployments/operations/read\",\"Microsoft.Resources/subscriptions/operationresults/read\",\"Microsoft.Resources/subscriptions/read\",\"Microsoft.Resources/subscriptions/resourcegroups/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-08-08T23:18:39.2257848Z\",\"updatedOn\":\"2018-09-14T00:53:37.7546808Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/25fbc0a9-bd7c-42a3-aa1a-3b75d497ee68\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"25fbc0a9-bd7c-42a3-aa1a-3b75d497ee68\"},{\"properties\":{\"roleName\":\"CosmosBackupOperator\",\"type\":\"BuiltInRole\",\"description\":\"Can + submit restore request for a Cosmos DB database or a container for an account\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.DocumentDB/databaseAccounts/backup/action\",\"Microsoft.DocumentDB/databaseAccounts/restore/action\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-12-07T19:47:14.9651560Z\",\"updatedOn\":\"2018-12-07T19:52:21.9969834Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/db7b14f2-5adf-42da-9f96-f2ee17bab5cb\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"db7b14f2-5adf-42da-9f96-f2ee17bab5cb\"},{\"properties\":{\"roleName\":\"Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Grants + full access to manage all resources, but does not allow you to assign roles + in Azure RBAC, manage assignments in Azure Blueprints, or share image galleries.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"*\"],\"notActions\":[\"Microsoft.Authorization/*/Delete\",\"Microsoft.Authorization/*/Write\",\"Microsoft.Authorization/elevateAccess/Action\",\"Microsoft.Blueprint/blueprintAssignments/write\",\"Microsoft.Blueprint/blueprintAssignments/delete\",\"Microsoft.Compute/galleries/share/action\"],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2020-12-04T00:34:54.8501087Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b24988ac-6180-42a0-ab88-20f7382dd24c\"},{\"properties\":{\"roleName\":\"Cosmos + DB Account Reader Role\",\"type\":\"BuiltInRole\",\"description\":\"Can read + Azure Cosmos DB Accounts data\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.DocumentDB/*/read\",\"Microsoft.DocumentDB/databaseAccounts/readonlykeys/action\",\"Microsoft.Insights/MetricDefinitions/read\",\"Microsoft.Insights/Metrics/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-10-30T17:53:54.6005577Z\",\"updatedOn\":\"2018-02-21T01:36:59.6186231Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/fbdf93bf-df7d-467e-a4d2-9458aa1360c8\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"fbdf93bf-df7d-467e-a4d2-9458aa1360c8\"},{\"properties\":{\"roleName\":\"Cost + Management Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Can view + costs and manage cost configuration (e.g. budgets, exports)\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Consumption/*\",\"Microsoft.CostManagement/*\",\"Microsoft.Billing/billingPeriods/read\",\"Microsoft.Resources/subscriptions/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.Advisor/configurations/read\",\"Microsoft.Advisor/recommendations/read\",\"Microsoft.Management/managementGroups/read\",\"Microsoft.Billing/billingProperty/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-03-14T16:09:22.8834827Z\",\"updatedOn\":\"2020-12-07T19:54:47.1563148Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/434105ed-43f6-45c7-a02f-909b2ba83430\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"434105ed-43f6-45c7-a02f-909b2ba83430\"},{\"properties\":{\"roleName\":\"Cost + Management Reader\",\"type\":\"BuiltInRole\",\"description\":\"Can view cost + data and configuration (e.g. budgets, exports)\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Consumption/*/read\",\"Microsoft.CostManagement/*/read\",\"Microsoft.Billing/billingPeriods/read\",\"Microsoft.Resources/subscriptions/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.Advisor/configurations/read\",\"Microsoft.Advisor/recommendations/read\",\"Microsoft.Management/managementGroups/read\",\"Microsoft.Billing/billingProperty/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-03-14T16:09:22.8834827Z\",\"updatedOn\":\"2020-12-07T19:53:58.6391267Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/72fafb9e-0641-4937-9268-a91bfd8191a3\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"72fafb9e-0641-4937-9268-a91bfd8191a3\"},{\"properties\":{\"roleName\":\"Data + Box Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage + everything under Data Box Service except giving access to others.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.Databox/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-07-27T08:28:42.7140210Z\",\"updatedOn\":\"2018-07-27T08:36:56.3827309Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/add466c9-e687-43fc-8d98-dfcf8d720be5\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"add466c9-e687-43fc-8d98-dfcf8d720be5\"},{\"properties\":{\"roleName\":\"Data + Box Reader\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage Data + Box Service except creating order or editing order details and giving access + to others.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Databox/*/read\",\"Microsoft.Databox/jobs/listsecrets/action\",\"Microsoft.Databox/jobs/listcredentials/action\",\"Microsoft.Databox/locations/availableSkus/action\",\"Microsoft.Databox/locations/validateInputs/action\",\"Microsoft.Databox/locations/regionConfiguration/action\",\"Microsoft.Databox/locations/validateAddress/action\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-07-27T08:26:21.9284772Z\",\"updatedOn\":\"2020-01-24T05:39:52.6143537Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/028f4ed7-e2a9-465e-a8f4-9c0ffdfdc027\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"028f4ed7-e2a9-465e-a8f4-9c0ffdfdc027\"},{\"properties\":{\"roleName\":\"Data + Factory Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Create and + manage data factories, as well as child resources within them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.DataFactory/dataFactories/*\",\"Microsoft.DataFactory/factories/*\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.EventGrid/eventSubscriptions/write\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2020-02-14T19:49:21.5789216Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/673868aa-7521-48a0-acc6-0f60742d39f5\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"673868aa-7521-48a0-acc6-0f60742d39f5\"},{\"properties\":{\"roleName\":\"Data + Purger\",\"type\":\"BuiltInRole\",\"description\":\"Can purge analytics data\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Insights/components/*/read\",\"Microsoft.Insights/components/purge/action\",\"Microsoft.OperationalInsights/workspaces/*/read\",\"Microsoft.OperationalInsights/workspaces/purge/action\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-04-30T22:39:49.6167700Z\",\"updatedOn\":\"2018-04-30T22:44:15.1171162Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/150f5e0c-0603-4f03-8c7f-cf70034c4e90\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"150f5e0c-0603-4f03-8c7f-cf70034c4e90\"},{\"properties\":{\"roleName\":\"Data + Lake Analytics Developer\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you submit, monitor, and manage your own jobs but not create or delete Data + Lake Analytics accounts.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.BigAnalytics/accounts/*\",\"Microsoft.DataLakeAnalytics/accounts/*\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[\"Microsoft.BigAnalytics/accounts/Delete\",\"Microsoft.BigAnalytics/accounts/TakeOwnership/action\",\"Microsoft.BigAnalytics/accounts/Write\",\"Microsoft.DataLakeAnalytics/accounts/Delete\",\"Microsoft.DataLakeAnalytics/accounts/TakeOwnership/action\",\"Microsoft.DataLakeAnalytics/accounts/Write\",\"Microsoft.DataLakeAnalytics/accounts/dataLakeStoreAccounts/Write\",\"Microsoft.DataLakeAnalytics/accounts/dataLakeStoreAccounts/Delete\",\"Microsoft.DataLakeAnalytics/accounts/storageAccounts/Write\",\"Microsoft.DataLakeAnalytics/accounts/storageAccounts/Delete\",\"Microsoft.DataLakeAnalytics/accounts/firewallRules/Write\",\"Microsoft.DataLakeAnalytics/accounts/firewallRules/Delete\",\"Microsoft.DataLakeAnalytics/accounts/computePolicies/Write\",\"Microsoft.DataLakeAnalytics/accounts/computePolicies/Delete\"],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-10-20T00:33:29.3115234Z\",\"updatedOn\":\"2017-08-18T00:00:17.0411642Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/47b7735b-770e-4598-a7da-8b91488b4c88\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"47b7735b-770e-4598-a7da-8b91488b4c88\"},{\"properties\":{\"roleName\":\"DevTest + Labs User\",\"type\":\"BuiltInRole\",\"description\":\"Lets you connect, start, + restart, and shutdown your virtual machines in your Azure DevTest Labs.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Compute/availabilitySets/read\",\"Microsoft.Compute/virtualMachines/*/read\",\"Microsoft.Compute/virtualMachines/deallocate/action\",\"Microsoft.Compute/virtualMachines/read\",\"Microsoft.Compute/virtualMachines/restart/action\",\"Microsoft.Compute/virtualMachines/start/action\",\"Microsoft.DevTestLab/*/read\",\"Microsoft.DevTestLab/labs/claimAnyVm/action\",\"Microsoft.DevTestLab/labs/createEnvironment/action\",\"Microsoft.DevTestLab/labs/ensureCurrentUserProfile/action\",\"Microsoft.DevTestLab/labs/formulas/delete\",\"Microsoft.DevTestLab/labs/formulas/read\",\"Microsoft.DevTestLab/labs/formulas/write\",\"Microsoft.DevTestLab/labs/policySets/evaluatePolicies/action\",\"Microsoft.DevTestLab/labs/virtualMachines/claim/action\",\"Microsoft.DevTestLab/labs/virtualmachines/listApplicableSchedules/action\",\"Microsoft.DevTestLab/labs/virtualMachines/getRdpFileContents/action\",\"Microsoft.Network/loadBalancers/backendAddressPools/join/action\",\"Microsoft.Network/loadBalancers/inboundNatRules/join/action\",\"Microsoft.Network/networkInterfaces/*/read\",\"Microsoft.Network/networkInterfaces/join/action\",\"Microsoft.Network/networkInterfaces/read\",\"Microsoft.Network/networkInterfaces/write\",\"Microsoft.Network/publicIPAddresses/*/read\",\"Microsoft.Network/publicIPAddresses/join/action\",\"Microsoft.Network/publicIPAddresses/read\",\"Microsoft.Network/virtualNetworks/subnets/join/action\",\"Microsoft.Resources/deployments/operations/read\",\"Microsoft.Resources/deployments/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Storage/storageAccounts/listKeys/action\"],\"notActions\":[\"Microsoft.Compute/virtualMachines/vmSizes/read\"],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-06-08T21:52:45.0657582Z\",\"updatedOn\":\"2019-05-08T11:27:34.8855476Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/76283e04-6283-4c54-8f91-bcf1374a3c64\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"76283e04-6283-4c54-8f91-bcf1374a3c64\"},{\"properties\":{\"roleName\":\"DocumentDB + Account Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + manage DocumentDB accounts, but not access to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.DocumentDb/databaseAccounts/*\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.Network/virtualNetworks/subnets/joinViaServiceEndpoint/action\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2019-11-21T01:38:32.0948484Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/5bd9cd88-fe45-4216-938b-f97437e15450\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"5bd9cd88-fe45-4216-938b-f97437e15450\"},{\"properties\":{\"roleName\":\"DNS + Zone Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage + DNS zones and record sets in Azure DNS, but does not let you control who has + access to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Network/dnsZones/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-10-15T23:33:25.9730842Z\",\"updatedOn\":\"2016-05-31T23:13:40.3710365Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/befefa01-2a29-4197-83a8-272ff33ce314\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"befefa01-2a29-4197-83a8-272ff33ce314\"},{\"properties\":{\"roleName\":\"EventGrid + EventSubscription Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you manage EventGrid event subscription operations.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.EventGrid/eventSubscriptions/*\",\"Microsoft.EventGrid/topicTypes/eventSubscriptions/read\",\"Microsoft.EventGrid/locations/eventSubscriptions/read\",\"Microsoft.EventGrid/locations/topicTypes/eventSubscriptions/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-10-08T23:27:28.3130743Z\",\"updatedOn\":\"2019-01-08T00:06:34.3543171Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/428e0ff0-5e57-4d9c-a221-2c70d0e0a443\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"428e0ff0-5e57-4d9c-a221-2c70d0e0a443\"},{\"properties\":{\"roleName\":\"EventGrid + EventSubscription Reader\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you read EventGrid event subscriptions.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.EventGrid/eventSubscriptions/read\",\"Microsoft.EventGrid/topicTypes/eventSubscriptions/read\",\"Microsoft.EventGrid/locations/eventSubscriptions/read\",\"Microsoft.EventGrid/locations/topicTypes/eventSubscriptions/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-10-09T17:29:28.1417894Z\",\"updatedOn\":\"2019-01-08T00:05:40.2884365Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2414bbcf-6497-4faf-8c65-045460748405\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"2414bbcf-6497-4faf-8c65-045460748405\"},{\"properties\":{\"roleName\":\"Graph + Owner\",\"type\":\"BuiltInRole\",\"description\":\"Create and manage all aspects + of the Enterprise Graph - Ontology, Schema mapping, Conflation and Conversational + AI and Ingestions\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.EnterpriseKnowledgeGraph/services/conflation/read\",\"Microsoft.EnterpriseKnowledgeGraph/services/conflation/write\",\"Microsoft.EnterpriseKnowledgeGraph/services/sourceschema/read\",\"Microsoft.EnterpriseKnowledgeGraph/services/sourceschema/write\",\"Microsoft.EnterpriseKnowledgeGraph/services/knowledge/read\",\"Microsoft.EnterpriseKnowledgeGraph/services/knowledge/write\",\"Microsoft.EnterpriseKnowledgeGraph/services/intentclassification/read\",\"Microsoft.EnterpriseKnowledgeGraph/services/intentclassification/write\",\"Microsoft.EnterpriseKnowledgeGraph/services/ingestion/read\",\"Microsoft.EnterpriseKnowledgeGraph/services/ingestion/write\",\"Microsoft.EnterpriseKnowledgeGraph/services/ontology/read\",\"Microsoft.EnterpriseKnowledgeGraph/services/ontology/write\",\"Microsoft.EnterpriseKnowledgeGraph/services/delete\",\"Microsoft.EnterpriseKnowledgeGraph/operations/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-02-23T21:07:22.5844236Z\",\"updatedOn\":\"2019-02-28T20:21:18.9318073Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b60367af-1334-4454-b71e-769d9a4f83d9\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b60367af-1334-4454-b71e-769d9a4f83d9\"},{\"properties\":{\"roleName\":\"HDInsight + Domain Services Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Can + Read, Create, Modify and Delete Domain Services related operations needed + for HDInsight Enterprise Security Package\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.AAD/*/read\",\"Microsoft.AAD/domainServices/*/read\",\"Microsoft.AAD/domainServices/oucontainer/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-09-12T22:42:51.7451109Z\",\"updatedOn\":\"2018-09-12T23:06:45.7641599Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8d8d5a11-05d3-4bda-a417-a08778121c7c\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"8d8d5a11-05d3-4bda-a417-a08778121c7c\"},{\"properties\":{\"roleName\":\"Intelligent + Systems Account Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you manage Intelligent Systems accounts, but not access to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.IntelligentSystems/accounts/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2019-02-05T20:32:00.9996357Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/03a6d094-3444-4b3d-88af-7477090a9e5e\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"03a6d094-3444-4b3d-88af-7477090a9e5e\"},{\"properties\":{\"roleName\":\"Key + Vault Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage + key vaults, but not access to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.KeyVault/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[\"Microsoft.KeyVault/locations/deletedVaults/purge/action\",\"Microsoft.KeyVault/hsmPools/*\",\"Microsoft.KeyVault/managedHsms/*\"],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2016-02-25T17:08:28.5184971Z\",\"updatedOn\":\"2020-09-17T00:42:51.7334302Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/f25e0fa2-a7c8-4377-a976-54943a77a395\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"f25e0fa2-a7c8-4377-a976-54943a77a395\"},{\"properties\":{\"roleName\":\"Knowledge + Consumer\",\"type\":\"BuiltInRole\",\"description\":\"Knowledge Read permission + to consume Enterprise Graph Knowledge using entity search and graph query\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.EnterpriseKnowledgeGraph/services/knowledge/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-02-23T21:23:31.4037552Z\",\"updatedOn\":\"2019-02-28T20:25:00.7369384Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/ee361c5d-f7b5-4119-b4b6-892157c8f64c\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"ee361c5d-f7b5-4119-b4b6-892157c8f64c\"},{\"properties\":{\"roleName\":\"Lab + Creator\",\"type\":\"BuiltInRole\",\"description\":\"Lets you create new labs + under your Azure Lab Accounts.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.LabServices/labAccounts/*/read\",\"Microsoft.LabServices/labAccounts/createLab/action\",\"Microsoft.LabServices/labAccounts/getPricingAndAvailability/action\",\"Microsoft.LabServices/labAccounts/getRestrictionsAndUsage/action\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-01-18T23:38:58.1036141Z\",\"updatedOn\":\"2020-07-10T17:45:43.2289715Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b97fb8bc-a8b2-4522-a38b-dd33c7e65ead\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b97fb8bc-a8b2-4522-a38b-dd33c7e65ead\"},{\"properties\":{\"roleName\":\"Log + Analytics Reader\",\"type\":\"BuiltInRole\",\"description\":\"Log Analytics + Reader can view and search all monitoring data as well as and view monitoring + settings, including viewing the configuration of Azure diagnostics on all + Azure resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"*/read\",\"Microsoft.OperationalInsights/workspaces/analytics/query/action\",\"Microsoft.OperationalInsights/workspaces/search/action\",\"Microsoft.Support/*\"],\"notActions\":[\"Microsoft.OperationalInsights/workspaces/sharedKeys/read\"],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-05-02T00:20:28.1449012Z\",\"updatedOn\":\"2018-01-30T18:08:26.0438523Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/73c42c96-874c-492b-b04d-ab87d138a893\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"73c42c96-874c-492b-b04d-ab87d138a893\"},{\"properties\":{\"roleName\":\"Log + Analytics Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Log Analytics + Contributor can read all monitoring data and edit monitoring settings. Editing + monitoring settings includes adding the VM extension to VMs; reading storage + account keys to be able to configure collection of logs from Azure Storage; + creating and configuring Automation accounts; adding solutions; and configuring + Azure diagnostics on all Azure resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"*/read\",\"Microsoft.Automation/automationAccounts/*\",\"Microsoft.ClassicCompute/virtualMachines/extensions/*\",\"Microsoft.ClassicStorage/storageAccounts/listKeys/action\",\"Microsoft.Compute/virtualMachines/extensions/*\",\"Microsoft.HybridCompute/machines/extensions/write\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Insights/diagnosticSettings/*\",\"Microsoft.OperationalInsights/*\",\"Microsoft.OperationsManagement/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourcegroups/deployments/*\",\"Microsoft.Storage/storageAccounts/listKeys/action\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-04-25T21:51:45.3174711Z\",\"updatedOn\":\"2020-03-26T22:57:55.3667830Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/92aaf0da-9dab-42b6-94a3-d43ce8d16293\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"92aaf0da-9dab-42b6-94a3-d43ce8d16293\"},{\"properties\":{\"roleName\":\"Logic + App Operator\",\"type\":\"BuiltInRole\",\"description\":\"Lets you read, enable + and disable logic app.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*/read\",\"Microsoft.Insights/metricAlerts/*/read\",\"Microsoft.Insights/diagnosticSettings/*/read\",\"Microsoft.Insights/metricDefinitions/*/read\",\"Microsoft.Logic/*/read\",\"Microsoft.Logic/workflows/disable/action\",\"Microsoft.Logic/workflows/enable/action\",\"Microsoft.Logic/workflows/validate/action\",\"Microsoft.Resources/deployments/operations/read\",\"Microsoft.Resources/subscriptions/operationresults/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.Web/connectionGateways/*/read\",\"Microsoft.Web/connections/*/read\",\"Microsoft.Web/customApis/*/read\",\"Microsoft.Web/serverFarms/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2016-04-28T21:33:30.4656007Z\",\"updatedOn\":\"2019-10-15T04:28:56.3265986Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/515c2055-d9d4-4321-b1b9-bd0c9a0f79fe\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"515c2055-d9d4-4321-b1b9-bd0c9a0f79fe\"},{\"properties\":{\"roleName\":\"Logic + App Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage + logic app, but not access to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.ClassicStorage/storageAccounts/listKeys/action\",\"Microsoft.ClassicStorage/storageAccounts/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Insights/metricAlerts/*\",\"Microsoft.Insights/diagnosticSettings/*\",\"Microsoft.Insights/logdefinitions/*\",\"Microsoft.Insights/metricDefinitions/*\",\"Microsoft.Logic/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/operationresults/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Storage/storageAccounts/listkeys/action\",\"Microsoft.Storage/storageAccounts/read\",\"Microsoft.Support/*\",\"Microsoft.Web/connectionGateways/*\",\"Microsoft.Web/connections/*\",\"Microsoft.Web/customApis/*\",\"Microsoft.Web/serverFarms/join/action\",\"Microsoft.Web/serverFarms/read\",\"Microsoft.Web/sites/functions/listSecrets/action\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2016-04-28T21:33:30.4656007Z\",\"updatedOn\":\"2019-10-15T04:31:27.7685427Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/87a39d53-fc1b-424a-814c-f7e04687dc9e\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"87a39d53-fc1b-424a-814c-f7e04687dc9e\"},{\"properties\":{\"roleName\":\"Managed + Application Operator Role\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you read and perform actions on Managed Application resources\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"*/read\",\"Microsoft.Solutions/applications/read\",\"Microsoft.Solutions/*/action\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-07-27T00:59:33.7988813Z\",\"updatedOn\":\"2019-02-20T01:09:55.1593079Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/c7393b34-138c-406f-901b-d8cf2b17e6ae\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"c7393b34-138c-406f-901b-d8cf2b17e6ae\"},{\"properties\":{\"roleName\":\"Managed + Applications Reader\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + read resources in a managed app and request JIT access.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"*/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Solutions/jitRequests/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-09-06T00:33:58.3651522Z\",\"updatedOn\":\"2018-09-06T00:33:58.3651522Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b9331d33-8a36-4f8c-b097-4f54124fdb44\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b9331d33-8a36-4f8c-b097-4f54124fdb44\"},{\"properties\":{\"roleName\":\"Managed + Identity Operator\",\"type\":\"BuiltInRole\",\"description\":\"Read and Assign + User Assigned Identity\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ManagedIdentity/userAssignedIdentities/*/read\",\"Microsoft.ManagedIdentity/userAssignedIdentities/*/assign/action\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-12-14T19:52:04.3924594Z\",\"updatedOn\":\"2017-12-14T22:16:00.1483256Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/f1a07417-d97a-45cb-824c-7a7467783830\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"f1a07417-d97a-45cb-824c-7a7467783830\"},{\"properties\":{\"roleName\":\"Managed + Identity Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Create, + Read, Update, and Delete User Assigned Identity\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ManagedIdentity/userAssignedIdentities/read\",\"Microsoft.ManagedIdentity/userAssignedIdentities/write\",\"Microsoft.ManagedIdentity/userAssignedIdentities/delete\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-12-14T19:53:42.8804692Z\",\"updatedOn\":\"2019-06-20T21:51:27.0850433Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/e40ec5ca-96e0-45a2-b4ff-59039f2c2b59\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"e40ec5ca-96e0-45a2-b4ff-59039f2c2b59\"},{\"properties\":{\"roleName\":\"Management + Group Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Management + Group Contributor Role\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Management/managementGroups/delete\",\"Microsoft.Management/managementGroups/read\",\"Microsoft.Management/managementGroups/subscriptions/delete\",\"Microsoft.Management/managementGroups/subscriptions/write\",\"Microsoft.Management/managementGroups/write\",\"Microsoft.Management/managementGroups/subscriptions/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-06-22T00:28:29.0523964Z\",\"updatedOn\":\"2020-07-06T18:13:34.9045672Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/5d58bcaf-24a5-4b20-bdb6-eed9f69fbe4c\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"5d58bcaf-24a5-4b20-bdb6-eed9f69fbe4c\"},{\"properties\":{\"roleName\":\"Management + Group Reader\",\"type\":\"BuiltInRole\",\"description\":\"Management Group + Reader Role\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Management/managementGroups/read\",\"Microsoft.Management/managementGroups/subscriptions/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-06-22T00:31:03.4295347Z\",\"updatedOn\":\"2020-07-06T18:09:27.1441705Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/ac63b705-f282-497d-ac71-919bf39d939d\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"ac63b705-f282-497d-ac71-919bf39d939d\"},{\"properties\":{\"roleName\":\"Monitoring + Metrics Publisher\",\"type\":\"BuiltInRole\",\"description\":\"Enables publishing + metrics against Azure resources\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Insights/Register/Action\",\"Microsoft.Support/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Insights/Metrics/Write\"],\"notDataActions\":[]}],\"createdOn\":\"2018-08-14T00:36:16.5610279Z\",\"updatedOn\":\"2018-08-14T00:37:18.1465065Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3913510d-42f4-4e42-8a64-420c390055eb\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"3913510d-42f4-4e42-8a64-420c390055eb\"},{\"properties\":{\"roleName\":\"Monitoring + Reader\",\"type\":\"BuiltInRole\",\"description\":\"Can read all monitoring + data.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"*/read\",\"Microsoft.OperationalInsights/workspaces/search/action\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2016-09-21T19:19:52.4939376Z\",\"updatedOn\":\"2018-01-30T18:08:27.2626250Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/43d0d8ad-25c7-4714-9337-8ba259a9fe05\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"43d0d8ad-25c7-4714-9337-8ba259a9fe05\"},{\"properties\":{\"roleName\":\"Network + Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage networks, + but not access to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Network/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-06-02T00:18:27.3542698Z\",\"updatedOn\":\"2016-05-31T23:14:00.3326359Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"4d97b98b-1d4f-4787-a291-c67834d212e7\"},{\"properties\":{\"roleName\":\"Monitoring + Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Can read all monitoring + data and update monitoring settings.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"*/read\",\"Microsoft.AlertsManagement/alerts/*\",\"Microsoft.AlertsManagement/alertsSummary/*\",\"Microsoft.Insights/actiongroups/*\",\"Microsoft.Insights/activityLogAlerts/*\",\"Microsoft.Insights/AlertRules/*\",\"Microsoft.Insights/components/*\",\"Microsoft.Insights/dataCollectionRules/*\",\"Microsoft.Insights/dataCollectionRuleAssociations/*\",\"Microsoft.Insights/DiagnosticSettings/*\",\"Microsoft.Insights/eventtypes/*\",\"Microsoft.Insights/LogDefinitions/*\",\"Microsoft.Insights/metricalerts/*\",\"Microsoft.Insights/MetricDefinitions/*\",\"Microsoft.Insights/Metrics/*\",\"Microsoft.Insights/Register/Action\",\"Microsoft.Insights/scheduledqueryrules/*\",\"Microsoft.Insights/webtests/*\",\"Microsoft.Insights/workbooks/*\",\"Microsoft.Insights/privateLinkScopes/*\",\"Microsoft.Insights/privateLinkScopeOperationStatuses/*\",\"Microsoft.OperationalInsights/workspaces/write\",\"Microsoft.OperationalInsights/workspaces/intelligencepacks/*\",\"Microsoft.OperationalInsights/workspaces/savedSearches/*\",\"Microsoft.OperationalInsights/workspaces/search/action\",\"Microsoft.OperationalInsights/workspaces/sharedKeys/action\",\"Microsoft.OperationalInsights/workspaces/storageinsightconfigs/*\",\"Microsoft.Support/*\",\"Microsoft.WorkloadMonitor/monitors/*\",\"Microsoft.AlertsManagement/smartDetectorAlertRules/*\",\"Microsoft.AlertsManagement/actionRules/*\",\"Microsoft.AlertsManagement/smartGroups/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2016-09-21T19:21:08.4345976Z\",\"updatedOn\":\"2020-11-18T00:02:00.4868141Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/749f88d5-cbae-40b8-bcfc-e573ddc772fa\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"749f88d5-cbae-40b8-bcfc-e573ddc772fa\"},{\"properties\":{\"roleName\":\"New + Relic APM Account Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you manage New Relic Application Performance Management accounts and applications, + but not access to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"NewRelic.APM/accounts/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2019-02-05T20:42:16.2033878Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/5d28c62d-5b37-4476-8438-e587778df237\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"5d28c62d-5b37-4476-8438-e587778df237\"},{\"properties\":{\"roleName\":\"Owner\",\"type\":\"BuiltInRole\",\"description\":\"Grants + full access to manage all resources, including the ability to assign roles + in Azure RBAC.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2020-08-14T20:13:58.4137852Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"8e3af657-a8ff-443c-a75c-2fe8c4bcb635\"},{\"properties\":{\"roleName\":\"Reader\",\"type\":\"BuiltInRole\",\"description\":\"View + all resources, but does not allow you to make any changes.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"*/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2020-08-14T20:16:04.3791205Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"acdd72a7-3385-48ef-bd42-f606fba81ae7\"},{\"properties\":{\"roleName\":\"Redis + Cache Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage + Redis caches, but not access to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Cache/register/action\",\"Microsoft.Cache/redis/*\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2020-07-16T00:20:31.8240854Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/e0f68234-74aa-48ed-b826-c38b57376e17\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"e0f68234-74aa-48ed-b826-c38b57376e17\"},{\"properties\":{\"roleName\":\"Reader + and Data Access\",\"type\":\"BuiltInRole\",\"description\":\"Lets you view + everything but will not let you delete or create a storage account or contained + resource. It will also allow read/write access to all data contained in a + storage account via access to storage account keys.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Storage/storageAccounts/listKeys/action\",\"Microsoft.Storage/storageAccounts/ListAccountSas/action\",\"Microsoft.Storage/storageAccounts/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-03-27T23:20:46.1498906Z\",\"updatedOn\":\"2019-04-04T23:41:26.1056261Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/c12c1c16-33a1-487b-954d-41c89c60f349\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"c12c1c16-33a1-487b-954d-41c89c60f349\"},{\"properties\":{\"roleName\":\"Resource + Policy Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Users with + rights to create/modify resource policy, create support ticket and read resources/hierarchy.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"*/read\",\"Microsoft.Authorization/policyassignments/*\",\"Microsoft.Authorization/policydefinitions/*\",\"Microsoft.Authorization/policyexemptions/*\",\"Microsoft.Authorization/policysetdefinitions/*\",\"Microsoft.PolicyInsights/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-08-25T19:08:01.3861639Z\",\"updatedOn\":\"2020-08-20T19:01:05.4449634Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/36243c78-bf99-498c-9df9-86d9f8d28608\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"36243c78-bf99-498c-9df9-86d9f8d28608\"},{\"properties\":{\"roleName\":\"Scheduler + Job Collections Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you manage Scheduler job collections, but not access to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Scheduler/jobcollections/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2019-02-05T20:42:24.8360756Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/188a0f2f-5c9e-469b-ae67-2aa5ce574b94\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"188a0f2f-5c9e-469b-ae67-2aa5ce574b94\"},{\"properties\":{\"roleName\":\"Search + Service Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + manage Search services, but not access to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Search/searchServices/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2019-02-05T20:42:21.8687229Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/7ca78c08-252a-4471-8644-bb5ff32d4ba0\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"7ca78c08-252a-4471-8644-bb5ff32d4ba0\"},{\"properties\":{\"roleName\":\"Security + Admin\",\"type\":\"BuiltInRole\",\"description\":\"Security Admin Role\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Authorization/policyAssignments/*\",\"Microsoft.Authorization/policyDefinitions/*\",\"Microsoft.Authorization/policyExemptions/*\",\"Microsoft.Authorization/policySetDefinitions/*\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Management/managementGroups/read\",\"Microsoft.operationalInsights/workspaces/*/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Security/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-05-03T07:51:23.0917487Z\",\"updatedOn\":\"2020-08-20T19:15:25.4574979Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/fb1c8493-542b-48eb-b624-b4c8fea62acd\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"fb1c8493-542b-48eb-b624-b4c8fea62acd\"},{\"properties\":{\"roleName\":\"Security + Manager (Legacy)\",\"type\":\"BuiltInRole\",\"description\":\"This is a legacy + role. Please use Security Administrator instead\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.ClassicCompute/*/read\",\"Microsoft.ClassicCompute/virtualMachines/*/write\",\"Microsoft.ClassicNetwork/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Security/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-06-22T17:45:15.8986455Z\",\"updatedOn\":\"2018-03-08T18:18:48.6183620Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/e3d13bf0-dd5a-482e-ba6b-9b8433878d10\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"e3d13bf0-dd5a-482e-ba6b-9b8433878d10\"},{\"properties\":{\"roleName\":\"Security + Reader\",\"type\":\"BuiltInRole\",\"description\":\"Security Reader Role\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/read\",\"Microsoft.operationalInsights/workspaces/*/read\",\"Microsoft.Resources/deployments/*/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Security/*/read\",\"Microsoft.Support/*/read\",\"Microsoft.Security/iotDefenderSettings/packageDownloads/action\",\"Microsoft.Security/iotDefenderSettings/downloadManagerActivation/action\",\"Microsoft.Security/iotSensors/downloadResetPassword/action\",\"Microsoft.Management/managementGroups/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-05-03T07:48:49.0516559Z\",\"updatedOn\":\"2021-01-04T13:31:17.6216549Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/39bc4728-0917-49c7-9d2c-d95423bc2eb4\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"39bc4728-0917-49c7-9d2c-d95423bc2eb4\"},{\"properties\":{\"roleName\":\"Spatial + Anchors Account Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you manage spatial anchors in your account, but not delete them\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.MixedReality/SpatialAnchorsAccounts/create/action\",\"Microsoft.MixedReality/SpatialAnchorsAccounts/discovery/read\",\"Microsoft.MixedReality/SpatialAnchorsAccounts/properties/read\",\"Microsoft.MixedReality/SpatialAnchorsAccounts/query/read\",\"Microsoft.MixedReality/SpatialAnchorsAccounts/submitdiag/read\",\"Microsoft.MixedReality/SpatialAnchorsAccounts/write\"],\"notDataActions\":[]}],\"createdOn\":\"2018-12-21T17:57:41.1420864Z\",\"updatedOn\":\"2019-02-13T06:13:39.8686435Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8bbe83f1-e2a6-4df7-8cb4-4e04d4e5c827\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"8bbe83f1-e2a6-4df7-8cb4-4e04d4e5c827\"},{\"properties\":{\"roleName\":\"Site + Recovery Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + manage Site Recovery service except vault creation and role assignment\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Network/virtualNetworks/read\",\"Microsoft.RecoveryServices/locations/allocatedStamp/read\",\"Microsoft.RecoveryServices/locations/allocateStamp/action\",\"Microsoft.RecoveryServices/Vaults/certificates/write\",\"Microsoft.RecoveryServices/Vaults/extendedInformation/*\",\"Microsoft.RecoveryServices/Vaults/read\",\"Microsoft.RecoveryServices/Vaults/refreshContainers/read\",\"Microsoft.RecoveryServices/Vaults/registeredIdentities/*\",\"Microsoft.RecoveryServices/vaults/replicationAlertSettings/*\",\"Microsoft.RecoveryServices/vaults/replicationEvents/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/*\",\"Microsoft.RecoveryServices/vaults/replicationJobs/*\",\"Microsoft.RecoveryServices/vaults/replicationPolicies/*\",\"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/*\",\"Microsoft.RecoveryServices/Vaults/storageConfig/*\",\"Microsoft.RecoveryServices/Vaults/tokenInfo/read\",\"Microsoft.RecoveryServices/Vaults/usages/read\",\"Microsoft.RecoveryServices/Vaults/vaultTokens/read\",\"Microsoft.RecoveryServices/Vaults/monitoringAlerts/*\",\"Microsoft.RecoveryServices/Vaults/monitoringConfigurations/notificationConfiguration/read\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Storage/storageAccounts/read\",\"Microsoft.RecoveryServices/vaults/replicationOperationStatus/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-05-19T13:46:17.4592776Z\",\"updatedOn\":\"2019-11-07T06:13:49.0760858Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/6670b86e-a3f7-4917-ac9b-5d6ab1be4567\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"6670b86e-a3f7-4917-ac9b-5d6ab1be4567\"},{\"properties\":{\"roleName\":\"Site + Recovery Operator\",\"type\":\"BuiltInRole\",\"description\":\"Lets you failover + and failback but not perform other Site Recovery management operations\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Network/virtualNetworks/read\",\"Microsoft.RecoveryServices/locations/allocatedStamp/read\",\"Microsoft.RecoveryServices/locations/allocateStamp/action\",\"Microsoft.RecoveryServices/Vaults/extendedInformation/read\",\"Microsoft.RecoveryServices/Vaults/read\",\"Microsoft.RecoveryServices/Vaults/refreshContainers/read\",\"Microsoft.RecoveryServices/Vaults/registeredIdentities/operationResults/read\",\"Microsoft.RecoveryServices/Vaults/registeredIdentities/read\",\"Microsoft.RecoveryServices/vaults/replicationAlertSettings/read\",\"Microsoft.RecoveryServices/vaults/replicationEvents/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/checkConsistency/action\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/reassociateGateway/action\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/renewcertificate/action\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/applyRecoveryPoint/action\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/failoverCommit/action\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/plannedFailover/action\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/repairReplication/action\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/reProtect/action\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/switchprotection/action\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/testFailover/action\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/testFailoverCleanup/action\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/unplannedFailover/action\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/updateMobilityService/action\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/refreshProvider/action\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/replicationStorageClassificationMappings/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationvCenters/read\",\"Microsoft.RecoveryServices/vaults/replicationJobs/*\",\"Microsoft.RecoveryServices/vaults/replicationPolicies/read\",\"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/failoverCommit/action\",\"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/plannedFailover/action\",\"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/read\",\"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/reProtect/action\",\"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/testFailover/action\",\"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/testFailoverCleanup/action\",\"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/unplannedFailover/action\",\"Microsoft.RecoveryServices/Vaults/monitoringAlerts/*\",\"Microsoft.RecoveryServices/Vaults/monitoringConfigurations/notificationConfiguration/read\",\"Microsoft.RecoveryServices/Vaults/storageConfig/read\",\"Microsoft.RecoveryServices/Vaults/tokenInfo/read\",\"Microsoft.RecoveryServices/Vaults/usages/read\",\"Microsoft.RecoveryServices/Vaults/vaultTokens/read\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Storage/storageAccounts/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-05-19T13:47:50.1341148Z\",\"updatedOn\":\"2019-08-28T12:00:57.4472826Z\",\"createdBy\":null,\"updatedBy\":\"\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/494ae006-db33-4328-bf46-533a6560a3ca\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"494ae006-db33-4328-bf46-533a6560a3ca\"},{\"properties\":{\"roleName\":\"Spatial + Anchors Account Reader\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + locate and read properties of spatial anchors in your account\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.MixedReality/SpatialAnchorsAccounts/discovery/read\",\"Microsoft.MixedReality/SpatialAnchorsAccounts/properties/read\",\"Microsoft.MixedReality/SpatialAnchorsAccounts/query/read\",\"Microsoft.MixedReality/SpatialAnchorsAccounts/submitdiag/read\"],\"notDataActions\":[]}],\"createdOn\":\"2018-12-21T17:57:42.9271004Z\",\"updatedOn\":\"2019-02-13T06:16:15.3170663Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/5d51204f-eb77-4b1c-b86a-2ec626c49413\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"5d51204f-eb77-4b1c-b86a-2ec626c49413\"},{\"properties\":{\"roleName\":\"Site + Recovery Reader\",\"type\":\"BuiltInRole\",\"description\":\"Lets you view + Site Recovery status but not perform other management operations\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.RecoveryServices/locations/allocatedStamp/read\",\"Microsoft.RecoveryServices/Vaults/extendedInformation/read\",\"Microsoft.RecoveryServices/Vaults/monitoringAlerts/read\",\"Microsoft.RecoveryServices/Vaults/monitoringConfigurations/notificationConfiguration/read\",\"Microsoft.RecoveryServices/Vaults/read\",\"Microsoft.RecoveryServices/Vaults/refreshContainers/read\",\"Microsoft.RecoveryServices/Vaults/registeredIdentities/operationResults/read\",\"Microsoft.RecoveryServices/Vaults/registeredIdentities/read\",\"Microsoft.RecoveryServices/vaults/replicationAlertSettings/read\",\"Microsoft.RecoveryServices/vaults/replicationEvents/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/replicationStorageClassificationMappings/read\",\"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationvCenters/read\",\"Microsoft.RecoveryServices/vaults/replicationJobs/read\",\"Microsoft.RecoveryServices/vaults/replicationPolicies/read\",\"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/read\",\"Microsoft.RecoveryServices/Vaults/storageConfig/read\",\"Microsoft.RecoveryServices/Vaults/tokenInfo/read\",\"Microsoft.RecoveryServices/Vaults/usages/read\",\"Microsoft.RecoveryServices/Vaults/vaultTokens/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-05-19T13:35:40.0093634Z\",\"updatedOn\":\"2017-05-26T19:54:51.3933250Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/dbaa88c4-0c30-4179-9fb3-46319faa6149\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"dbaa88c4-0c30-4179-9fb3-46319faa6149\"},{\"properties\":{\"roleName\":\"Spatial + Anchors Account Owner\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + manage spatial anchors in your account, including deleting them\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.MixedReality/SpatialAnchorsAccounts/create/action\",\"Microsoft.MixedReality/SpatialAnchorsAccounts/delete\",\"Microsoft.MixedReality/SpatialAnchorsAccounts/discovery/read\",\"Microsoft.MixedReality/SpatialAnchorsAccounts/properties/read\",\"Microsoft.MixedReality/SpatialAnchorsAccounts/query/read\",\"Microsoft.MixedReality/SpatialAnchorsAccounts/submitdiag/read\",\"Microsoft.MixedReality/SpatialAnchorsAccounts/write\"],\"notDataActions\":[]}],\"createdOn\":\"2018-12-21T17:57:43.5489832Z\",\"updatedOn\":\"2019-02-13T06:15:31.8572222Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/70bbe301-9835-447d-afdd-19eb3167307c\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"70bbe301-9835-447d-afdd-19eb3167307c\"},{\"properties\":{\"roleName\":\"SQL + Managed Instance Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you manage SQL Managed Instances and required network configuration, but can\u2019t + give access to others.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Network/networkSecurityGroups/*\",\"Microsoft.Network/routeTables/*\",\"Microsoft.Sql/locations/*/read\",\"Microsoft.Sql/locations/instanceFailoverGroups/*\",\"Microsoft.Sql/managedInstances/*\",\"Microsoft.Support/*\",\"Microsoft.Network/virtualNetworks/subnets/*\",\"Microsoft.Network/virtualNetworks/*\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Insights/metrics/read\",\"Microsoft.Insights/metricDefinitions/read\"],\"notActions\":[\"Microsoft.Sql/managedInstances/azureADOnlyAuthentications/delete\",\"Microsoft.Sql/managedInstances/azureADOnlyAuthentications/write\"],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2018-12-10T22:57:14.2937983Z\",\"updatedOn\":\"2020-09-23T23:26:54.2667459Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4939a1f6-9ae0-4e48-a1e0-f2cbe897382d\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"4939a1f6-9ae0-4e48-a1e0-f2cbe897382d\"},{\"properties\":{\"roleName\":\"SQL + DB Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage + SQL databases, but not access to them. Also, you can't manage their security-related + policies or their parent SQL servers.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Sql/locations/*/read\",\"Microsoft.Sql/servers/databases/*\",\"Microsoft.Sql/servers/read\",\"Microsoft.Support/*\",\"Microsoft.Insights/metrics/read\",\"Microsoft.Insights/metricDefinitions/read\"],\"notActions\":[\"Microsoft.Sql/servers/databases/ledgerDigestUploads/write\",\"Microsoft.Sql/servers/databases/ledgerDigestUploads/disable/action\",\"Microsoft.Sql/managedInstances/databases/currentSensitivityLabels/*\",\"Microsoft.Sql/managedInstances/databases/recommendedSensitivityLabels/*\",\"Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels/*\",\"Microsoft.Sql/managedInstances/databases/securityAlertPolicies/*\",\"Microsoft.Sql/managedInstances/databases/sensitivityLabels/*\",\"Microsoft.Sql/managedInstances/databases/vulnerabilityAssessments/*\",\"Microsoft.Sql/managedInstances/securityAlertPolicies/*\",\"Microsoft.Sql/managedInstances/vulnerabilityAssessments/*\",\"Microsoft.Sql/servers/databases/auditingSettings/*\",\"Microsoft.Sql/servers/databases/auditRecords/read\",\"Microsoft.Sql/servers/databases/currentSensitivityLabels/*\",\"Microsoft.Sql/servers/databases/dataMaskingPolicies/*\",\"Microsoft.Sql/servers/databases/extendedAuditingSettings/*\",\"Microsoft.Sql/servers/databases/recommendedSensitivityLabels/*\",\"Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels/*\",\"Microsoft.Sql/servers/databases/securityAlertPolicies/*\",\"Microsoft.Sql/servers/databases/securityMetrics/*\",\"Microsoft.Sql/servers/databases/sensitivityLabels/*\",\"Microsoft.Sql/servers/databases/vulnerabilityAssessments/*\",\"Microsoft.Sql/servers/databases/vulnerabilityAssessmentScans/*\",\"Microsoft.Sql/servers/databases/vulnerabilityAssessmentSettings/*\",\"Microsoft.Sql/servers/vulnerabilityAssessments/*\"],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2021-06-09T20:32:10.4467708Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9b7fa17d-e63e-47b0-bb0a-15c516ac86ec\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"9b7fa17d-e63e-47b0-bb0a-15c516ac86ec\"},{\"properties\":{\"roleName\":\"SQL + Security Manager\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage + the security-related policies of SQL servers and databases, but not access + to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Network/virtualNetworks/subnets/joinViaServiceEndpoint/action\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Sql/locations/administratorAzureAsyncOperation/read\",\"Microsoft.Sql/managedInstances/databases/currentSensitivityLabels/*\",\"Microsoft.Sql/managedInstances/databases/recommendedSensitivityLabels/*\",\"Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels/*\",\"Microsoft.Sql/managedInstances/databases/securityAlertPolicies/*\",\"Microsoft.Sql/managedInstances/databases/sensitivityLabels/*\",\"Microsoft.Sql/managedInstances/databases/vulnerabilityAssessments/*\",\"Microsoft.Sql/managedInstances/securityAlertPolicies/*\",\"Microsoft.Sql/managedInstances/databases/transparentDataEncryption/*\",\"Microsoft.Sql/managedInstances/vulnerabilityAssessments/*\",\"Microsoft.Sql/servers/auditingSettings/*\",\"Microsoft.Sql/servers/extendedAuditingSettings/read\",\"Microsoft.Sql/servers/databases/auditingSettings/*\",\"Microsoft.Sql/servers/databases/auditRecords/read\",\"Microsoft.Sql/servers/databases/currentSensitivityLabels/*\",\"Microsoft.Sql/servers/databases/dataMaskingPolicies/*\",\"Microsoft.Sql/servers/databases/extendedAuditingSettings/read\",\"Microsoft.Sql/servers/databases/read\",\"Microsoft.Sql/servers/databases/recommendedSensitivityLabels/*\",\"Microsoft.Sql/servers/databases/schemas/read\",\"Microsoft.Sql/servers/databases/schemas/tables/columns/read\",\"Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels/*\",\"Microsoft.Sql/servers/databases/schemas/tables/read\",\"Microsoft.Sql/servers/databases/securityAlertPolicies/*\",\"Microsoft.Sql/servers/databases/securityMetrics/*\",\"Microsoft.Sql/servers/databases/sensitivityLabels/*\",\"Microsoft.Sql/servers/databases/transparentDataEncryption/*\",\"Microsoft.Sql/servers/databases/vulnerabilityAssessments/*\",\"Microsoft.Sql/servers/databases/vulnerabilityAssessmentScans/*\",\"Microsoft.Sql/servers/databases/vulnerabilityAssessmentSettings/*\",\"Microsoft.Sql/servers/devOpsAuditingSettings/*\",\"Microsoft.Sql/servers/firewallRules/*\",\"Microsoft.Sql/servers/read\",\"Microsoft.Sql/servers/securityAlertPolicies/*\",\"Microsoft.Sql/servers/vulnerabilityAssessments/*\",\"Microsoft.Support/*\",\"Microsoft.Sql/servers/azureADOnlyAuthentications/*\",\"Microsoft.Sql/managedInstances/read\",\"Microsoft.Sql/managedInstances/azureADOnlyAuthentications/*\",\"Microsoft.Security/sqlVulnerabilityAssessments/*\",\"Microsoft.Sql/managedInstances/administrators/read\",\"Microsoft.Sql/servers/administrators/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-06-16T18:44:40.4607572Z\",\"updatedOn\":\"2021-03-08T21:18:46.2003218Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/056cd41c-7e88-42e1-933e-88ba6a50c9c3\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"056cd41c-7e88-42e1-933e-88ba6a50c9c3\"},{\"properties\":{\"roleName\":\"Storage + Account Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + manage storage accounts, including accessing storage account keys which provide + full access to storage account data.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Insights/diagnosticSettings/*\",\"Microsoft.Network/virtualNetworks/subnets/joinViaServiceEndpoint/action\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Storage/storageAccounts/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-06-02T00:18:27.3542698Z\",\"updatedOn\":\"2019-05-29T20:56:33.9582501Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/17d1049b-9a84-46fb-8f53-869881c3d3ab\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"17d1049b-9a84-46fb-8f53-869881c3d3ab\"},{\"properties\":{\"roleName\":\"SQL + Server Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage + SQL servers and databases, but not access to them, and not their security + -related policies.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Sql/locations/*/read\",\"Microsoft.Sql/servers/*\",\"Microsoft.Support/*\",\"Microsoft.Insights/metrics/read\",\"Microsoft.Insights/metricDefinitions/read\"],\"notActions\":[\"Microsoft.Sql/managedInstances/databases/currentSensitivityLabels/*\",\"Microsoft.Sql/managedInstances/databases/recommendedSensitivityLabels/*\",\"Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels/*\",\"Microsoft.Sql/managedInstances/databases/securityAlertPolicies/*\",\"Microsoft.Sql/managedInstances/databases/sensitivityLabels/*\",\"Microsoft.Sql/managedInstances/databases/vulnerabilityAssessments/*\",\"Microsoft.Sql/managedInstances/securityAlertPolicies/*\",\"Microsoft.Sql/managedInstances/vulnerabilityAssessments/*\",\"Microsoft.Sql/servers/auditingSettings/*\",\"Microsoft.Sql/servers/databases/auditingSettings/*\",\"Microsoft.Sql/servers/databases/auditRecords/read\",\"Microsoft.Sql/servers/databases/currentSensitivityLabels/*\",\"Microsoft.Sql/servers/databases/dataMaskingPolicies/*\",\"Microsoft.Sql/servers/databases/extendedAuditingSettings/*\",\"Microsoft.Sql/servers/databases/recommendedSensitivityLabels/*\",\"Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels/*\",\"Microsoft.Sql/servers/databases/securityAlertPolicies/*\",\"Microsoft.Sql/servers/databases/securityMetrics/*\",\"Microsoft.Sql/servers/databases/sensitivityLabels/*\",\"Microsoft.Sql/servers/databases/vulnerabilityAssessments/*\",\"Microsoft.Sql/servers/databases/vulnerabilityAssessmentScans/*\",\"Microsoft.Sql/servers/databases/vulnerabilityAssessmentSettings/*\",\"Microsoft.Sql/servers/devOpsAuditingSettings/*\",\"Microsoft.Sql/servers/extendedAuditingSettings/*\",\"Microsoft.Sql/servers/securityAlertPolicies/*\",\"Microsoft.Sql/servers/vulnerabilityAssessments/*\",\"Microsoft.Sql/servers/azureADOnlyAuthentications/delete\",\"Microsoft.Sql/servers/azureADOnlyAuthentications/write\"],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2021-03-08T21:19:28.9102955Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/6d8ee4ec-f05a-4a1d-8b00-a9b17e38b437\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"6d8ee4ec-f05a-4a1d-8b00-a9b17e38b437\"},{\"properties\":{\"roleName\":\"Storage + Account Key Operator Service Role\",\"type\":\"BuiltInRole\",\"description\":\"Storage + Account Key Operators are allowed to list and regenerate keys on Storage Accounts\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Storage/storageAccounts/listkeys/action\",\"Microsoft.Storage/storageAccounts/regeneratekey/action\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-04-13T18:26:11.5770570Z\",\"updatedOn\":\"2017-04-13T20:57:14.5990198Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/81a9662b-bebf-436f-a333-f67b29880f12\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"81a9662b-bebf-436f-a333-f67b29880f12\"},{\"properties\":{\"roleName\":\"Storage + Blob Data Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Allows + for read, write and delete access to Azure Storage blob containers and data\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Storage/storageAccounts/blobServices/containers/delete\",\"Microsoft.Storage/storageAccounts/blobServices/containers/read\",\"Microsoft.Storage/storageAccounts/blobServices/containers/write\",\"Microsoft.Storage/storageAccounts/blobServices/generateUserDelegationKey/action\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/delete\",\"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read\",\"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write\",\"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/move/action\",\"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/add/action\"],\"notDataActions\":[]}],\"createdOn\":\"2017-12-21T00:01:24.7972312Z\",\"updatedOn\":\"2021-02-04T07:04:50.1529191Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/ba92f5b4-2d11-453d-a403-e96b0029c9fe\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"ba92f5b4-2d11-453d-a403-e96b0029c9fe\"},{\"properties\":{\"roleName\":\"Storage + Blob Data Owner\",\"type\":\"BuiltInRole\",\"description\":\"Allows for full + access to Azure Storage blob containers and data, including assigning POSIX + access control.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Storage/storageAccounts/blobServices/containers/*\",\"Microsoft.Storage/storageAccounts/blobServices/generateUserDelegationKey/action\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/*\"],\"notDataActions\":[]}],\"createdOn\":\"2018-12-04T07:02:58.2775257Z\",\"updatedOn\":\"2019-07-16T21:30:33.7002563Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b7e6dc6d-f1e8-4753-8033-0f276bb0955b\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b7e6dc6d-f1e8-4753-8033-0f276bb0955b\"},{\"properties\":{\"roleName\":\"Storage + Blob Data Reader\",\"type\":\"BuiltInRole\",\"description\":\"Allows for read + access to Azure Storage blob containers and data\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Storage/storageAccounts/blobServices/containers/read\",\"Microsoft.Storage/storageAccounts/blobServices/generateUserDelegationKey/action\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read\"],\"notDataActions\":[]}],\"createdOn\":\"2017-12-21T00:01:24.7972312Z\",\"updatedOn\":\"2019-07-15T22:01:25.5409721Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"2a2b9908-6ea1-4ae2-8e65-a410df84e7d1\"},{\"properties\":{\"roleName\":\"Storage + Queue Data Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Allows + for read, write, and delete access to Azure Storage queues and queue messages\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Storage/storageAccounts/queueServices/queues/delete\",\"Microsoft.Storage/storageAccounts/queueServices/queues/read\",\"Microsoft.Storage/storageAccounts/queueServices/queues/write\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Storage/storageAccounts/queueServices/queues/messages/delete\",\"Microsoft.Storage/storageAccounts/queueServices/queues/messages/read\",\"Microsoft.Storage/storageAccounts/queueServices/queues/messages/write\",\"Microsoft.Storage/storageAccounts/queueServices/queues/messages/process/action\"],\"notDataActions\":[]}],\"createdOn\":\"2017-12-21T00:01:24.7972312Z\",\"updatedOn\":\"2021-01-25T01:32:24.1141692Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/974c5e8b-45b9-4653-ba55-5f855dd0fb88\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"974c5e8b-45b9-4653-ba55-5f855dd0fb88\"},{\"properties\":{\"roleName\":\"Storage + Queue Data Message Processor\",\"type\":\"BuiltInRole\",\"description\":\"Allows + for peek, receive, and delete access to Azure Storage queue messages\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Storage/storageAccounts/queueServices/queues/messages/read\",\"Microsoft.Storage/storageAccounts/queueServices/queues/messages/process/action\"],\"notDataActions\":[]}],\"createdOn\":\"2019-01-28T22:27:04.8947111Z\",\"updatedOn\":\"2019-03-05T22:05:46.1259125Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8a0f0c08-91a1-4084-bc3d-661d67233fed\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"8a0f0c08-91a1-4084-bc3d-661d67233fed\"},{\"properties\":{\"roleName\":\"Storage + Queue Data Message Sender\",\"type\":\"BuiltInRole\",\"description\":\"Allows + for sending of Azure Storage queue messages\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Storage/storageAccounts/queueServices/queues/messages/add/action\"],\"notDataActions\":[]}],\"createdOn\":\"2019-01-28T22:28:34.7459724Z\",\"updatedOn\":\"2019-03-05T22:11:49.6383892Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/c6a89b2d-59bc-44d0-9896-0f6e12d7b80a\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"c6a89b2d-59bc-44d0-9896-0f6e12d7b80a\"},{\"properties\":{\"roleName\":\"Storage + Queue Data Reader\",\"type\":\"BuiltInRole\",\"description\":\"Allows for + read access to Azure Storage queues and queue messages\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Storage/storageAccounts/queueServices/queues/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Storage/storageAccounts/queueServices/queues/messages/read\"],\"notDataActions\":[]}],\"createdOn\":\"2017-12-21T00:01:24.7972312Z\",\"updatedOn\":\"2019-03-05T22:17:32.1779262Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/19e7f393-937e-4f77-808e-94535e297925\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"19e7f393-937e-4f77-808e-94535e297925\"},{\"properties\":{\"roleName\":\"Support + Request Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + create and manage Support requests\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-06-22T22:25:37.8053068Z\",\"updatedOn\":\"2017-06-23T01:06:24.2399631Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/cfd33db0-3dd1-45e3-aa9d-cdbdf3b6f24e\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"cfd33db0-3dd1-45e3-aa9d-cdbdf3b6f24e\"},{\"properties\":{\"roleName\":\"Traffic + Manager Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + manage Traffic Manager profiles, but does not let you control who has access + to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Network/trafficManagerProfiles/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-10-15T23:33:25.9730842Z\",\"updatedOn\":\"2016-05-31T23:13:44.1458854Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/a4b10055-b0c7-44c2-b00f-c7b5b3550cf7\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"a4b10055-b0c7-44c2-b00f-c7b5b3550cf7\"},{\"properties\":{\"roleName\":\"Virtual + Machine Administrator Login\",\"type\":\"BuiltInRole\",\"description\":\"View + Virtual Machines in the portal and login as administrator\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Network/publicIPAddresses/read\",\"Microsoft.Network/virtualNetworks/read\",\"Microsoft.Network/loadBalancers/read\",\"Microsoft.Network/networkInterfaces/read\",\"Microsoft.Compute/virtualMachines/*/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Compute/virtualMachines/login/action\",\"Microsoft.Compute/virtualMachines/loginAsAdmin/action\"],\"notDataActions\":[]}],\"createdOn\":\"2018-02-09T18:36:13.3315744Z\",\"updatedOn\":\"2018-05-09T22:17:57.0514548Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/1c0163c0-47e6-4577-8991-ea5c82e286e4\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"1c0163c0-47e6-4577-8991-ea5c82e286e4\"},{\"properties\":{\"roleName\":\"User + Access Administrator\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + manage user access to Azure resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"*/read\",\"Microsoft.Authorization/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2019-02-05T21:24:12.6807454Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/18d7d88d-d35e-4fb5-a5c3-7773c20a72d9\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"18d7d88d-d35e-4fb5-a5c3-7773c20a72d9\"},{\"properties\":{\"roleName\":\"Virtual + Machine User Login\",\"type\":\"BuiltInRole\",\"description\":\"View Virtual + Machines in the portal and login as a regular user.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Network/publicIPAddresses/read\",\"Microsoft.Network/virtualNetworks/read\",\"Microsoft.Network/loadBalancers/read\",\"Microsoft.Network/networkInterfaces/read\",\"Microsoft.Compute/virtualMachines/*/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Compute/virtualMachines/login/action\"],\"notDataActions\":[]}],\"createdOn\":\"2018-02-09T18:36:13.3315744Z\",\"updatedOn\":\"2018-05-09T22:18:52.2780979Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/fb879df8-f326-4884-b1cf-06f3ad86be52\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"fb879df8-f326-4884-b1cf-06f3ad86be52\"},{\"properties\":{\"roleName\":\"Virtual + Machine Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + manage virtual machines, but not access to them, and not the virtual network + or storage account they're connected to.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Compute/availabilitySets/*\",\"Microsoft.Compute/locations/*\",\"Microsoft.Compute/virtualMachines/*\",\"Microsoft.Compute/virtualMachineScaleSets/*\",\"Microsoft.Compute/disks/write\",\"Microsoft.Compute/disks/read\",\"Microsoft.Compute/disks/delete\",\"Microsoft.DevTestLab/schedules/*\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Network/applicationGateways/backendAddressPools/join/action\",\"Microsoft.Network/loadBalancers/backendAddressPools/join/action\",\"Microsoft.Network/loadBalancers/inboundNatPools/join/action\",\"Microsoft.Network/loadBalancers/inboundNatRules/join/action\",\"Microsoft.Network/loadBalancers/probes/join/action\",\"Microsoft.Network/loadBalancers/read\",\"Microsoft.Network/locations/*\",\"Microsoft.Network/networkInterfaces/*\",\"Microsoft.Network/networkSecurityGroups/join/action\",\"Microsoft.Network/networkSecurityGroups/read\",\"Microsoft.Network/publicIPAddresses/join/action\",\"Microsoft.Network/publicIPAddresses/read\",\"Microsoft.Network/virtualNetworks/read\",\"Microsoft.Network/virtualNetworks/subnets/join/action\",\"Microsoft.RecoveryServices/locations/*\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/backupProtectionIntent/write\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/*/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/read\",\"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/write\",\"Microsoft.RecoveryServices/Vaults/backupPolicies/read\",\"Microsoft.RecoveryServices/Vaults/backupPolicies/write\",\"Microsoft.RecoveryServices/Vaults/read\",\"Microsoft.RecoveryServices/Vaults/usages/read\",\"Microsoft.RecoveryServices/Vaults/write\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.SqlVirtualMachine/*\",\"Microsoft.Storage/storageAccounts/listKeys/action\",\"Microsoft.Storage/storageAccounts/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-06-02T00:18:27.3542698Z\",\"updatedOn\":\"2020-02-03T19:38:21.2170228Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"9980e02c-c2be-4d73-94e8-173b1dc7cf3c\"},{\"properties\":{\"roleName\":\"Web + Plan Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage + the web plans for websites, but not access to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.Web/serverFarms/*\",\"Microsoft.Web/hostingEnvironments/Join/Action\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2019-03-26T18:17:34.5018645Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2cc479cb-7b4d-49a8-b449-8c00fd0f0a4b\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"2cc479cb-7b4d-49a8-b449-8c00fd0f0a4b\"},{\"properties\":{\"roleName\":\"Website + Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage websites + (not web plans), but not access to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Insights/components/*\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.Web/certificates/*\",\"Microsoft.Web/listSitesAssignedToHostName/read\",\"Microsoft.Web/serverFarms/join/action\",\"Microsoft.Web/serverFarms/read\",\"Microsoft.Web/sites/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-05-12T23:10:23.6193952Z\",\"updatedOn\":\"2019-02-05T21:24:46.9407288Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/de139f84-1756-47ae-9be6-808fbbe84772\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"de139f84-1756-47ae-9be6-808fbbe84772\"},{\"properties\":{\"roleName\":\"Azure + Service Bus Data Owner\",\"type\":\"BuiltInRole\",\"description\":\"Allows + for full access to Azure Service Bus resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ServiceBus/*\"],\"notActions\":[],\"dataActions\":[\"Microsoft.ServiceBus/*\"],\"notDataActions\":[]}],\"createdOn\":\"2019-04-16T21:33:36.7445745Z\",\"updatedOn\":\"2019-08-21T22:47:11.3982905Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/090c5cfd-751d-490a-894a-3ce6f1109419\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"090c5cfd-751d-490a-894a-3ce6f1109419\"},{\"properties\":{\"roleName\":\"Azure + Event Hubs Data Owner\",\"type\":\"BuiltInRole\",\"description\":\"Allows + for full access to Azure Event Hubs resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.EventHub/*\"],\"notActions\":[],\"dataActions\":[\"Microsoft.EventHub/*\"],\"notDataActions\":[]}],\"createdOn\":\"2019-04-16T21:34:29.8656362Z\",\"updatedOn\":\"2019-08-21T22:58:57.7584645Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/f526a384-b230-433a-b45c-95f59c4a2dec\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"f526a384-b230-433a-b45c-95f59c4a2dec\"},{\"properties\":{\"roleName\":\"Attestation + Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Can read write or + delete the attestation provider instance\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Attestation/attestationProviders/attestation/read\",\"Microsoft.Attestation/attestationProviders/attestation/write\",\"Microsoft.Attestation/attestationProviders/attestation/delete\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-04-19T00:24:09.3354177Z\",\"updatedOn\":\"2019-05-10T17:59:06.3448436Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/bbf86eb8-f7b4-4cce-96e4-18cddf81d86e\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"bbf86eb8-f7b4-4cce-96e4-18cddf81d86e\"},{\"properties\":{\"roleName\":\"HDInsight + Cluster Operator\",\"type\":\"BuiltInRole\",\"description\":\"Lets you read + and modify HDInsight cluster configurations.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.HDInsight/*/read\",\"Microsoft.HDInsight/clusters/getGatewaySettings/action\",\"Microsoft.HDInsight/clusters/updateGatewaySettings/action\",\"Microsoft.HDInsight/clusters/configurations/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/deployments/operations/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Authorization/*/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-04-20T00:03:01.7110732Z\",\"updatedOn\":\"2019-04-28T02:34:17.4679314Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/61ed4efc-fab3-44fd-b111-e24485cc132a\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"61ed4efc-fab3-44fd-b111-e24485cc132a\"},{\"properties\":{\"roleName\":\"Cosmos + DB Operator\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage Azure + Cosmos DB accounts, but not access data in them. Prevents access to account + keys and connection strings.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.DocumentDb/databaseAccounts/*\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Authorization/*/read\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.Network/virtualNetworks/subnets/joinViaServiceEndpoint/action\"],\"notActions\":[\"Microsoft.DocumentDB/databaseAccounts/readonlyKeys/*\",\"Microsoft.DocumentDB/databaseAccounts/regenerateKey/*\",\"Microsoft.DocumentDB/databaseAccounts/listKeys/*\",\"Microsoft.DocumentDB/databaseAccounts/listConnectionStrings/*\",\"Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinitions/write\",\"Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinitions/delete\",\"Microsoft.DocumentDB/databaseAccounts/sqlRoleAssignments/write\",\"Microsoft.DocumentDB/databaseAccounts/sqlRoleAssignments/delete\"],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-04-26T17:01:17.0169383Z\",\"updatedOn\":\"2021-02-25T21:29:52.2924071Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/230815da-be43-4aae-9cb4-875f7bd000aa\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"230815da-be43-4aae-9cb4-875f7bd000aa\"},{\"properties\":{\"roleName\":\"Hybrid + Server Resource Administrator\",\"type\":\"BuiltInRole\",\"description\":\"Can + read, write, delete, and re-onboard Hybrid servers to the Hybrid Resource + Provider.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.HybridCompute/machines/*\",\"Microsoft.HybridCompute/*/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-04-29T21:39:32.3132923Z\",\"updatedOn\":\"2019-05-06T20:08:25.3180258Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/48b40c6e-82e0-4eb3-90d5-19e40f49b624\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"48b40c6e-82e0-4eb3-90d5-19e40f49b624\"},{\"properties\":{\"roleName\":\"Hybrid + Server Onboarding\",\"type\":\"BuiltInRole\",\"description\":\"Can onboard + new Hybrid servers to the Hybrid Resource Provider.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.HybridCompute/machines/read\",\"Microsoft.HybridCompute/machines/write\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-04-29T22:36:28.1873756Z\",\"updatedOn\":\"2019-05-06T20:09:17.9364269Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/5d1e5ee4-7c68-4a71-ac8b-0739630a3dfb\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"5d1e5ee4-7c68-4a71-ac8b-0739630a3dfb\"},{\"properties\":{\"roleName\":\"Azure + Event Hubs Data Receiver\",\"type\":\"BuiltInRole\",\"description\":\"Allows + receive access to Azure Event Hubs resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.EventHub/*/eventhubs/consumergroups/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.EventHub/*/receive/action\"],\"notDataActions\":[]}],\"createdOn\":\"2019-05-10T06:25:21.1056666Z\",\"updatedOn\":\"2019-08-21T23:00:32.6225396Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/a638d3c7-ab3a-418d-83e6-5f17a39d4fde\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"a638d3c7-ab3a-418d-83e6-5f17a39d4fde\"},{\"properties\":{\"roleName\":\"Azure + Event Hubs Data Sender\",\"type\":\"BuiltInRole\",\"description\":\"Allows + send access to Azure Event Hubs resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.EventHub/*/eventhubs/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.EventHub/*/send/action\"],\"notDataActions\":[]}],\"createdOn\":\"2019-05-10T06:26:12.4673714Z\",\"updatedOn\":\"2019-08-21T23:02:26.6155679Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2b629674-e913-4c01-ae53-ef4638d8f975\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"2b629674-e913-4c01-ae53-ef4638d8f975\"},{\"properties\":{\"roleName\":\"Azure + Service Bus Data Receiver\",\"type\":\"BuiltInRole\",\"description\":\"Allows + for receive access to Azure Service Bus resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ServiceBus/*/queues/read\",\"Microsoft.ServiceBus/*/topics/read\",\"Microsoft.ServiceBus/*/topics/subscriptions/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.ServiceBus/*/receive/action\"],\"notDataActions\":[]}],\"createdOn\":\"2019-05-10T06:43:01.6343849Z\",\"updatedOn\":\"2019-08-21T22:55:24.3423558Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4f6d3b9b-027b-4f4c-9142-0e5a2a2247e0\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"4f6d3b9b-027b-4f4c-9142-0e5a2a2247e0\"},{\"properties\":{\"roleName\":\"Azure + Service Bus Data Sender\",\"type\":\"BuiltInRole\",\"description\":\"Allows + for send access to Azure Service Bus resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ServiceBus/*/queues/read\",\"Microsoft.ServiceBus/*/topics/read\",\"Microsoft.ServiceBus/*/topics/subscriptions/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.ServiceBus/*/send/action\"],\"notDataActions\":[]}],\"createdOn\":\"2019-05-10T06:43:46.7046934Z\",\"updatedOn\":\"2019-08-21T22:57:12.2555683Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/69a216fc-b8fb-44d8-bc22-1f3c2cd27a39\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"69a216fc-b8fb-44d8-bc22-1f3c2cd27a39\"},{\"properties\":{\"roleName\":\"Storage + File Data SMB Share Reader\",\"type\":\"BuiltInRole\",\"description\":\"Allows + for read access to Azure File Share over SMB\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Storage/storageAccounts/fileServices/fileshares/files/read\"],\"notDataActions\":[]}],\"createdOn\":\"2019-07-01T20:19:31.8620471Z\",\"updatedOn\":\"2019-08-07T01:00:41.9223409Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/aba4ae5f-2193-4029-9191-0cb91df5e314\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"aba4ae5f-2193-4029-9191-0cb91df5e314\"},{\"properties\":{\"roleName\":\"Storage + File Data SMB Share Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Allows + for read, write, and delete access in Azure Storage file shares over SMB\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Storage/storageAccounts/fileServices/fileshares/files/read\",\"Microsoft.Storage/storageAccounts/fileServices/fileshares/files/write\",\"Microsoft.Storage/storageAccounts/fileServices/fileshares/files/delete\"],\"notDataActions\":[]}],\"createdOn\":\"2019-07-01T20:54:35.4834310Z\",\"updatedOn\":\"2019-08-07T01:05:24.4309872Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/0c867c2a-1d8c-454a-a3db-ab2ea1bdc8bb\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"0c867c2a-1d8c-454a-a3db-ab2ea1bdc8bb\"},{\"properties\":{\"roleName\":\"Private + DNS Zone Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + manage private DNS zone resources, but not the virtual networks they are linked + to.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.Network/privateDnsZones/*\",\"Microsoft.Network/privateDnsOperationResults/*\",\"Microsoft.Network/privateDnsOperationStatuses/*\",\"Microsoft.Network/virtualNetworks/read\",\"Microsoft.Network/virtualNetworks/join/action\",\"Microsoft.Authorization/*/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-07-10T19:31:15.5645518Z\",\"updatedOn\":\"2019-07-11T21:12:01.7260648Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b12aa53e-6015-4669-85d0-8515ebb3ae7f\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b12aa53e-6015-4669-85d0-8515ebb3ae7f\"},{\"properties\":{\"roleName\":\"Storage + Blob Delegator\",\"type\":\"BuiltInRole\",\"description\":\"Allows for generation + of a user delegation key which can be used to sign SAS tokens\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Storage/storageAccounts/blobServices/generateUserDelegationKey/action\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-07-23T00:51:16.3376761Z\",\"updatedOn\":\"2019-07-23T01:14:31.8778475Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/db58b8e5-c6ad-4a2a-8342-4190687cbf4a\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"db58b8e5-c6ad-4a2a-8342-4190687cbf4a\"},{\"properties\":{\"roleName\":\"Desktop + Virtualization User\",\"type\":\"BuiltInRole\",\"description\":\"Allows user + to use the applications in an application group.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.DesktopVirtualization/applicationGroups/useApplications/action\"],\"notDataActions\":[]}],\"createdOn\":\"2019-08-07T00:29:03.8727621Z\",\"updatedOn\":\"2019-08-07T00:29:03.8727621Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/1d18fff3-a72a-46b5-b4a9-0b38a3cd7e63\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"1d18fff3-a72a-46b5-b4a9-0b38a3cd7e63\"},{\"properties\":{\"roleName\":\"Storage + File Data SMB Share Elevated Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Allows + for read, write, delete and modify NTFS permission access in Azure Storage + file shares over SMB\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Storage/storageAccounts/fileServices/fileshares/files/read\",\"Microsoft.Storage/storageAccounts/fileServices/fileshares/files/write\",\"Microsoft.Storage/storageAccounts/fileServices/fileshares/files/delete\",\"Microsoft.Storage/storageAccounts/fileServices/fileshares/files/modifypermissions/action\"],\"notDataActions\":[]}],\"createdOn\":\"2019-08-07T01:35:36.9935457Z\",\"updatedOn\":\"2019-08-07T01:35:36.9935457Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/a7264617-510b-434b-a828-9731dc254ea7\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"a7264617-510b-434b-a828-9731dc254ea7\"},{\"properties\":{\"roleName\":\"Blueprint + Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Can manage blueprint + definitions, but not assign them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Blueprint/blueprints/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-08-14T21:55:16.9683949Z\",\"updatedOn\":\"2019-08-17T00:10:55.7494677Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/41077137-e803-4205-871c-5a86e6a753b4\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"41077137-e803-4205-871c-5a86e6a753b4\"},{\"properties\":{\"roleName\":\"Blueprint + Operator\",\"type\":\"BuiltInRole\",\"description\":\"Can assign existing + published blueprints, but cannot create new blueprints. NOTE: this only works + if the assignment is done with a user-assigned managed identity.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Blueprint/blueprintAssignments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-08-14T21:56:48.7897875Z\",\"updatedOn\":\"2019-08-17T00:06:02.6509737Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/437d2ced-4a38-4302-8479-ed2bcb43d090\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"437d2ced-4a38-4302-8479-ed2bcb43d090\"},{\"properties\":{\"roleName\":\"Azure + Sentinel Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Azure Sentinel + Contributor\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.SecurityInsights/*\",\"Microsoft.OperationalInsights/workspaces/analytics/query/action\",\"Microsoft.OperationalInsights/workspaces/*/read\",\"Microsoft.OperationalInsights/workspaces/savedSearches/*\",\"Microsoft.OperationsManagement/solutions/read\",\"Microsoft.OperationalInsights/workspaces/query/read\",\"Microsoft.OperationalInsights/workspaces/query/*/read\",\"Microsoft.OperationalInsights/workspaces/dataSources/read\",\"Microsoft.Insights/workbooks/*\",\"Microsoft.Insights/myworkbooks/read\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-08-28T16:39:03.8725173Z\",\"updatedOn\":\"2020-11-04T07:51:14.5680135Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/ab8e14d6-4a74-4a29-9ba8-549422addade\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"ab8e14d6-4a74-4a29-9ba8-549422addade\"},{\"properties\":{\"roleName\":\"Azure + Sentinel Responder\",\"type\":\"BuiltInRole\",\"description\":\"Azure Sentinel + Responder\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.SecurityInsights/*/read\",\"Microsoft.SecurityInsights/dataConnectorsCheckRequirements/action\",\"Microsoft.SecurityInsights/automationRules/*\",\"Microsoft.SecurityInsights/cases/*\",\"Microsoft.SecurityInsights/incidents/*\",\"Microsoft.SecurityInsights/threatIntelligence/indicators/appendTags/action\",\"Microsoft.SecurityInsights/threatIntelligence/indicators/query/action\",\"Microsoft.SecurityInsights/threatIntelligence/bulkTag/action\",\"Microsoft.SecurityInsights/threatIntelligence/indicators/appendTags/action\",\"Microsoft.SecurityInsights/threatIntelligence/indicators/replaceTags/action\",\"Microsoft.SecurityInsights/threatIntelligence/queryIndicators/action\",\"Microsoft.OperationalInsights/workspaces/analytics/query/action\",\"Microsoft.OperationalInsights/workspaces/*/read\",\"Microsoft.OperationalInsights/workspaces/dataSources/read\",\"Microsoft.OperationalInsights/workspaces/savedSearches/read\",\"Microsoft.OperationsManagement/solutions/read\",\"Microsoft.OperationalInsights/workspaces/query/read\",\"Microsoft.OperationalInsights/workspaces/query/*/read\",\"Microsoft.OperationalInsights/workspaces/dataSources/read\",\"Microsoft.Insights/workbooks/read\",\"Microsoft.Insights/myworkbooks/read\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[\"Microsoft.SecurityInsights/cases/*/Delete\",\"Microsoft.SecurityInsights/incidents/*/Delete\"],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-08-28T16:54:07.6467264Z\",\"updatedOn\":\"2020-12-08T13:06:10.4848344Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3e150937-b8fe-4cfb-8069-0eaf05ecd056\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"3e150937-b8fe-4cfb-8069-0eaf05ecd056\"},{\"properties\":{\"roleName\":\"Azure + Sentinel Reader\",\"type\":\"BuiltInRole\",\"description\":\"Azure Sentinel + Reader\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.SecurityInsights/*/read\",\"Microsoft.SecurityInsights/dataConnectorsCheckRequirements/action\",\"Microsoft.SecurityInsights/threatIntelligence/indicators/query/action\",\"Microsoft.SecurityInsights/threatIntelligence/queryIndicators/action\",\"Microsoft.OperationalInsights/workspaces/analytics/query/action\",\"Microsoft.OperationalInsights/workspaces/*/read\",\"Microsoft.OperationalInsights/workspaces/LinkedServices/read\",\"Microsoft.OperationalInsights/workspaces/savedSearches/read\",\"Microsoft.OperationsManagement/solutions/read\",\"Microsoft.OperationalInsights/workspaces/query/read\",\"Microsoft.OperationalInsights/workspaces/query/*/read\",\"Microsoft.OperationalInsights/workspaces/dataSources/read\",\"Microsoft.Insights/workbooks/read\",\"Microsoft.Insights/myworkbooks/read\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-08-28T16:58:50.1132117Z\",\"updatedOn\":\"2020-11-04T07:55:29.9187377Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8d289c81-5878-46d4-8554-54e1e3d8b5cb\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"8d289c81-5878-46d4-8554-54e1e3d8b5cb\"},{\"properties\":{\"roleName\":\"Workbook + Reader\",\"type\":\"BuiltInRole\",\"description\":\"Can read workbooks.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"microsoft.insights/workbooks/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-08-28T20:56:17.6808140Z\",\"updatedOn\":\"2019-08-28T21:43:05.0202124Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b279062a-9be3-42a0-92ae-8b3cf002ec4d\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b279062a-9be3-42a0-92ae-8b3cf002ec4d\"},{\"properties\":{\"roleName\":\"Workbook + Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Can save shared workbooks.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Insights/workbooks/write\",\"Microsoft.Insights/workbooks/delete\",\"Microsoft.Insights/workbooks/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-08-28T20:59:42.4820277Z\",\"updatedOn\":\"2020-01-22T00:05:20.9387210Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/e8ddcd69-c73f-4f9f-9844-4100522f16ad\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"e8ddcd69-c73f-4f9f-9844-4100522f16ad\"},{\"properties\":{\"roleName\":\"Policy + Insights Data Writer (Preview)\",\"type\":\"BuiltInRole\",\"description\":\"Allows + read access to resource policies and write access to resource component policy + events.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/policyassignments/read\",\"Microsoft.Authorization/policydefinitions/read\",\"Microsoft.Authorization/policyexemptions/read\",\"Microsoft.Authorization/policysetdefinitions/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.PolicyInsights/checkDataPolicyCompliance/action\",\"Microsoft.PolicyInsights/policyEvents/logDataEvents/action\"],\"notDataActions\":[]}],\"createdOn\":\"2019-09-19T19:35:20.9504127Z\",\"updatedOn\":\"2020-08-20T20:57:17.1579311Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/66bb4e9e-b016-4a94-8249-4c0511c2be84\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"66bb4e9e-b016-4a94-8249-4c0511c2be84\"},{\"properties\":{\"roleName\":\"SignalR + AccessKey Reader\",\"type\":\"BuiltInRole\",\"description\":\"Read SignalR + Service Access Keys\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.SignalRService/*/read\",\"Microsoft.SignalRService/SignalR/listkeys/action\",\"Microsoft.Authorization/*/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-09-20T09:33:19.6236874Z\",\"updatedOn\":\"2019-09-20T09:33:19.6236874Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/04165923-9d83-45d5-8227-78b77b0a687e\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"04165923-9d83-45d5-8227-78b77b0a687e\"},{\"properties\":{\"roleName\":\"SignalR + Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Create, Read, Update, + and Delete SignalR service resources\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.SignalRService/*\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-09-20T09:58:09.0009662Z\",\"updatedOn\":\"2019-09-20T09:58:09.0009662Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8cf5e20a-e4b2-4e9d-b3a1-5ceb692c2761\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"8cf5e20a-e4b2-4e9d-b3a1-5ceb692c2761\"},{\"properties\":{\"roleName\":\"Azure + Connected Machine Onboarding\",\"type\":\"BuiltInRole\",\"description\":\"Can + onboard Azure Connected Machines.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.HybridCompute/machines/read\",\"Microsoft.HybridCompute/machines/write\",\"Microsoft.HybridCompute/privateLinkScopes/read\",\"Microsoft.GuestConfiguration/guestConfigurationAssignments/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-10-23T20:15:07.1372870Z\",\"updatedOn\":\"2021-03-23T20:13:08.5139847Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b64e21ea-ac4e-4cdf-9dc9-5b892992bee7\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b64e21ea-ac4e-4cdf-9dc9-5b892992bee7\"},{\"properties\":{\"roleName\":\"Azure + Connected Machine Resource Administrator\",\"type\":\"BuiltInRole\",\"description\":\"Can + read, write, delete and re-onboard Azure Connected Machines.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.HybridCompute/machines/read\",\"Microsoft.HybridCompute/machines/write\",\"Microsoft.HybridCompute/machines/delete\",\"Microsoft.HybridCompute/machines/UpgradeExtensions/action\",\"Microsoft.HybridCompute/machines/extensions/read\",\"Microsoft.HybridCompute/machines/extensions/write\",\"Microsoft.HybridCompute/machines/extensions/delete\",\"Microsoft.HybridCompute/privateLinkScopes/*\",\"Microsoft.HybridCompute/*/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-10-23T20:24:59.1474607Z\",\"updatedOn\":\"2021-06-08T18:14:40.8972223Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/cd570a14-e51a-42ad-bac8-bafd67325302\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"cd570a14-e51a-42ad-bac8-bafd67325302\"},{\"properties\":{\"roleName\":\"Managed + Services Registration assignment Delete Role\",\"type\":\"BuiltInRole\",\"description\":\"Managed + Services Registration Assignment Delete Role allows the managing tenant users + to delete the registration assignment assigned to their tenant.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ManagedServices/registrationAssignments/read\",\"Microsoft.ManagedServices/registrationAssignments/delete\",\"Microsoft.ManagedServices/operationStatuses/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-10-23T22:33:33.1183469Z\",\"updatedOn\":\"2019-10-24T21:49:09.3875276Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/91c1777a-f3dc-4fae-b103-61d183457e46\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"91c1777a-f3dc-4fae-b103-61d183457e46\"},{\"properties\":{\"roleName\":\"App + Configuration Data Owner\",\"type\":\"BuiltInRole\",\"description\":\"Allows + full access to App Configuration data.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.AppConfiguration/configurationStores/*/read\",\"Microsoft.AppConfiguration/configurationStores/*/write\",\"Microsoft.AppConfiguration/configurationStores/*/delete\"],\"notDataActions\":[]}],\"createdOn\":\"2019-10-25T18:41:40.1185063Z\",\"updatedOn\":\"2019-10-25T18:41:40.1185063Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/5ae67dd6-50cb-40e7-96ff-dc2bfa4b606b\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"5ae67dd6-50cb-40e7-96ff-dc2bfa4b606b\"},{\"properties\":{\"roleName\":\"App + Configuration Data Reader\",\"type\":\"BuiltInRole\",\"description\":\"Allows + read access to App Configuration data.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.AppConfiguration/configurationStores/*/read\"],\"notDataActions\":[]}],\"createdOn\":\"2019-10-25T18:45:33.7975332Z\",\"updatedOn\":\"2019-10-25T18:45:33.7975332Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/516239f1-63e1-4d78-a4de-a74fb236a071\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"516239f1-63e1-4d78-a4de-a74fb236a071\"},{\"properties\":{\"roleName\":\"Kubernetes + Cluster - Azure Arc Onboarding\",\"type\":\"BuiltInRole\",\"description\":\"Role + definition to authorize any user/service to create connectedClusters resource\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/write\",\"Microsoft.Resources/subscriptions/operationresults/read\",\"Microsoft.Resources/subscriptions/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Kubernetes/connectedClusters/Write\",\"Microsoft.Kubernetes/connectedClusters/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2019-11-18T17:00:02.2087147Z\",\"updatedOn\":\"2020-02-10T22:40:48.3317559Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/34e09817-6cbe-4d01-b1a2-e0eac5743d41\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"34e09817-6cbe-4d01-b1a2-e0eac5743d41\"},{\"properties\":{\"roleName\":\"Experimentation + Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Experimentation Contributor\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Experimentation/experimentWorkspaces/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Experimentation/experimentWorkspaces/experimentationGroups/read\",\"Microsoft.Experimentation/experimentWorkspaces/experimentationGroups/write\",\"Microsoft.Experimentation/experimentWorkspaces/experimentationGroups/delete\",\"Microsoft.Experimentation/experimentWorkspaces/experimentationGroups/experiment/action\",\"Microsoft.Experimentation/experimentWorkspaces/experimentationGroups/emergencystop/action\",\"Microsoft.Experimentation/experimentWorkspaces/read\",\"Microsoft.Experimentation/experimentWorkspaces/write\",\"Microsoft.Experimentation/experimentWorkspaces/delete\"],\"notDataActions\":[]}],\"createdOn\":\"2019-12-13T00:08:08.6679591Z\",\"updatedOn\":\"2021-03-05T16:02:04.1620231Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/7f646f1b-fa08-80eb-a22b-edd6ce5c915c\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"7f646f1b-fa08-80eb-a22b-edd6ce5c915c\"},{\"properties\":{\"roleName\":\"Cognitive + Services QnA Maker Reader\",\"type\":\"BuiltInRole\",\"description\":\"Let\u2019s + you read and test a KB only.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.CognitiveServices/*/read\",\"Microsoft.Authorization/roleAssignments/read\",\"Microsoft.Authorization/roleDefinitions/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.CognitiveServices/accounts/QnAMaker/knowledgebases/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker/knowledgebases/download/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker/knowledgebases/generateanswer/action\",\"Microsoft.CognitiveServices/accounts/QnAMaker/alterations/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker/endpointkeys/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker/endpointsettings/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/knowledgebases/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/knowledgebases/download/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/knowledgebases/generateanswer/action\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/alterations/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/endpointkeys/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/endpointsettings/read\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/knowledgebases/read\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/knowledgebases/download/read\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/knowledgebases/generateanswer/action\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/alterations/read\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/endpointkeys/read\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/endpointsettings/read\"],\"notDataActions\":[]}],\"createdOn\":\"2019-12-17T18:26:12.3329439Z\",\"updatedOn\":\"2021-03-11T06:28:58.3427040Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/466ccd10-b268-4a11-b098-b4849f024126\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"466ccd10-b268-4a11-b098-b4849f024126\"},{\"properties\":{\"roleName\":\"Cognitive + Services QnA Maker Editor\",\"type\":\"BuiltInRole\",\"description\":\"Let\u2019s + you create, edit, import and export a KB. You cannot publish or delete a KB.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.CognitiveServices/*/read\",\"Microsoft.Authorization/roleAssignments/read\",\"Microsoft.Authorization/roleDefinitions/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.CognitiveServices/accounts/QnAMaker/knowledgebases/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker/knowledgebases/download/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker/knowledgebases/create/write\",\"Microsoft.CognitiveServices/accounts/QnAMaker/knowledgebases/write\",\"Microsoft.CognitiveServices/accounts/QnAMaker/knowledgebases/generateanswer/action\",\"Microsoft.CognitiveServices/accounts/QnAMaker/knowledgebases/train/action\",\"Microsoft.CognitiveServices/accounts/QnAMaker/alterations/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker/alterations/write\",\"Microsoft.CognitiveServices/accounts/QnAMaker/endpointkeys/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker/endpointkeys/refreshkeys/action\",\"Microsoft.CognitiveServices/accounts/QnAMaker/endpointsettings/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker/endpointsettings/write\",\"Microsoft.CognitiveServices/accounts/QnAMaker/operations/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/knowledgebases/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/knowledgebases/download/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/knowledgebases/create/write\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/knowledgebases/write\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/knowledgebases/generateanswer/action\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/knowledgebases/train/action\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/alterations/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/alterations/write\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/endpointkeys/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/endpointkeys/refreshkeys/action\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/endpointsettings/read\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/endpointsettings/write\",\"Microsoft.CognitiveServices/accounts/QnAMaker.v2/operations/read\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/knowledgebases/read\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/knowledgebases/download/read\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/knowledgebases/create/write\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/knowledgebases/write\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/knowledgebases/generateanswer/action\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/knowledgebases/train/action\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/alterations/read\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/alterations/write\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/endpointkeys/read\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/endpointkeys/refreshkeys/action\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/endpointsettings/read\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/endpointsettings/write\",\"Microsoft.CognitiveServices/accounts/TextAnalytics/QnAMaker/operations/read\"],\"notDataActions\":[]}],\"createdOn\":\"2019-12-17T18:27:30.6434556Z\",\"updatedOn\":\"2021-03-11T06:28:27.6422359Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/f4cc2bf9-21be-47a1-bdf1-5c5804381025\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"f4cc2bf9-21be-47a1-bdf1-5c5804381025\"},{\"properties\":{\"roleName\":\"Experimentation + Administrator\",\"type\":\"BuiltInRole\",\"description\":\"Experimentation + Administrator\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Experimentation/experimentWorkspaces/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Experimentation/experimentWorkspaces/experimentationGroups/admin/action\",\"Microsoft.Experimentation/experimentWorkspaces/experimentationGroups/read\",\"Microsoft.Experimentation/experimentWorkspaces/experimentationGroups/write\",\"Microsoft.Experimentation/experimentWorkspaces/experimentationGroups/delete\",\"Microsoft.Experimentation/experimentWorkspaces/experimentationGroups/experimentadmin/action\",\"Microsoft.Experimentation/experimentWorkspaces/experimentationGroups/experiment/action\",\"Microsoft.Experimentation/experimentWorkspaces/experimentationGroups/emergencystop/action\",\"Microsoft.Experimentation/experimentWorkspaces/read\",\"Microsoft.Experimentation/experimentWorkspaces/write\",\"Microsoft.Experimentation/experimentWorkspaces/delete\",\"Microsoft.Experimentation/experimentWorkspaces/admin/action\",\"Microsoft.Experimentation/experimentWorkspaces/metricwrite/action\",\"Microsoft.Experimentation/experimentWorkspaces/experimentationGroups/metricwrite/action\"],\"notDataActions\":[]}],\"createdOn\":\"2019-12-18T22:46:33.1116612Z\",\"updatedOn\":\"2021-03-05T15:59:31.1406998Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/7f646f1b-fa08-80eb-a33b-edd6ce5c915c\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"7f646f1b-fa08-80eb-a33b-edd6ce5c915c\"},{\"properties\":{\"roleName\":\"Remote + Rendering Administrator\",\"type\":\"BuiltInRole\",\"description\":\"Provides + user with conversion, manage session, rendering and diagnostics capabilities + for Azure Remote Rendering\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.MixedReality/RemoteRenderingAccounts/convert/action\",\"Microsoft.MixedReality/RemoteRenderingAccounts/convert/read\",\"Microsoft.MixedReality/RemoteRenderingAccounts/convert/delete\",\"Microsoft.MixedReality/RemoteRenderingAccounts/managesessions/read\",\"Microsoft.MixedReality/RemoteRenderingAccounts/managesessions/action\",\"Microsoft.MixedReality/RemoteRenderingAccounts/managesessions/delete\",\"Microsoft.MixedReality/RemoteRenderingAccounts/render/read\",\"Microsoft.MixedReality/RemoteRenderingAccounts/diagnostic/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-01-23T18:15:31.3450348Z\",\"updatedOn\":\"2020-01-23T18:15:31.3450348Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3df8b902-2a6f-47c7-8cc5-360e9b272a7e\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"3df8b902-2a6f-47c7-8cc5-360e9b272a7e\"},{\"properties\":{\"roleName\":\"Remote + Rendering Client\",\"type\":\"BuiltInRole\",\"description\":\"Provides user + with manage session, rendering and diagnostics capabilities for Azure Remote + Rendering.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.MixedReality/RemoteRenderingAccounts/managesessions/read\",\"Microsoft.MixedReality/RemoteRenderingAccounts/managesessions/action\",\"Microsoft.MixedReality/RemoteRenderingAccounts/managesessions/delete\",\"Microsoft.MixedReality/RemoteRenderingAccounts/render/read\",\"Microsoft.MixedReality/RemoteRenderingAccounts/diagnostic/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-01-23T18:32:52.7069824Z\",\"updatedOn\":\"2020-01-23T18:32:52.7069824Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/d39065c4-c120-43c9-ab0a-63eed9795f0a\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"d39065c4-c120-43c9-ab0a-63eed9795f0a\"},{\"properties\":{\"roleName\":\"Managed + Application Contributor Role\",\"type\":\"BuiltInRole\",\"description\":\"Allows + for creating managed application resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"*/read\",\"Microsoft.Solutions/applications/*\",\"Microsoft.Solutions/register/action\",\"Microsoft.Resources/subscriptions/resourceGroups/*\",\"Microsoft.Resources/deployments/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-02-08T03:39:11.8933879Z\",\"updatedOn\":\"2020-03-23T02:12:30.0853051Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/641177b8-a67a-45b9-a033-47bc880bb21e\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"641177b8-a67a-45b9-a033-47bc880bb21e\"},{\"properties\":{\"roleName\":\"Security + Assessment Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + push assessments to Security Center\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Security/assessments/write\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-02-13T08:23:47.7656161Z\",\"updatedOn\":\"2020-02-13T08:23:47.7656161Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/612c2aa1-cb24-443b-ac28-3ab7272de6f5\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"612c2aa1-cb24-443b-ac28-3ab7272de6f5\"},{\"properties\":{\"roleName\":\"Tag + Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage tags + on entities, without providing access to the entities themselves.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/subscriptions/resourceGroups/resources/read\",\"Microsoft.Resources/subscriptions/resources/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Support/*\",\"Microsoft.Resources/tags/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-02-18T23:19:19.2977644Z\",\"updatedOn\":\"2020-02-19T00:04:58.9214962Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4a9ae827-6dc8-4573-8ac7-8239d42aa03f\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"4a9ae827-6dc8-4573-8ac7-8239d42aa03f\"},{\"properties\":{\"roleName\":\"Integration + Service Environment Developer\",\"type\":\"BuiltInRole\",\"description\":\"Allows + developers to create and update workflows, integration accounts and API connections + in integration service environments.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Support/*\",\"Microsoft.Logic/integrationServiceEnvironments/read\",\"Microsoft.Logic/integrationServiceEnvironments/*/join/action\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-02-20T21:09:00.5627875Z\",\"updatedOn\":\"2020-12-13T02:18:15.6697797Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/c7aa55d3-1abb-444a-a5ca-5e51e485d6ec\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"c7aa55d3-1abb-444a-a5ca-5e51e485d6ec\"},{\"properties\":{\"roleName\":\"Integration + Service Environment Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you manage integration service environments, but not access to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Support/*\",\"Microsoft.Logic/integrationServiceEnvironments/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-02-20T21:10:44.4008319Z\",\"updatedOn\":\"2020-02-20T21:41:56.7983599Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/a41e2c5b-bd99-4a07-88f4-9bf657a760b8\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"a41e2c5b-bd99-4a07-88f4-9bf657a760b8\"},{\"properties\":{\"roleName\":\"Azure + Kubernetes Service Contributor Role\",\"type\":\"BuiltInRole\",\"description\":\"Grants + access to read and write Azure Kubernetes Service clusters\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ContainerService/managedClusters/read\",\"Microsoft.ContainerService/managedClusters/write\",\"Microsoft.Resources/deployments/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-02-27T19:27:15.0739970Z\",\"updatedOn\":\"2020-02-28T02:34:14.5162305Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/ed7f3fbd-7b88-4dd4-9017-9adb7ce333f8\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"ed7f3fbd-7b88-4dd4-9017-9adb7ce333f8\"},{\"properties\":{\"roleName\":\"Azure + Digital Twins Data Reader\",\"type\":\"BuiltInRole\",\"description\":\"Read-only + role for Digital Twins data-plane properties\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.DigitalTwins/digitaltwins/read\",\"Microsoft.DigitalTwins/digitaltwins/relationships/read\",\"Microsoft.DigitalTwins/eventroutes/read\",\"Microsoft.DigitalTwins/models/read\",\"Microsoft.DigitalTwins/query/action\"],\"notDataActions\":[]}],\"createdOn\":\"2020-03-10T23:48:14.7057381Z\",\"updatedOn\":\"2020-10-22T21:06:59.5157226Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/d57506d4-4c8d-48b1-8587-93c323f6a5a3\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"d57506d4-4c8d-48b1-8587-93c323f6a5a3\"},{\"properties\":{\"roleName\":\"Azure + Digital Twins Data Owner\",\"type\":\"BuiltInRole\",\"description\":\"Full + access role for Digital Twins data-plane\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.DigitalTwins/eventroutes/*\",\"Microsoft.DigitalTwins/digitaltwins/*\",\"Microsoft.DigitalTwins/digitaltwins/commands/*\",\"Microsoft.DigitalTwins/digitaltwins/relationships/*\",\"Microsoft.DigitalTwins/models/*\",\"Microsoft.DigitalTwins/query/*\"],\"notDataActions\":[]}],\"createdOn\":\"2020-03-10T23:49:33.7821930Z\",\"updatedOn\":\"2020-10-22T21:07:31.8108410Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/bcd981a7-7f74-457b-83e1-cceb9e632ffe\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"bcd981a7-7f74-457b-83e1-cceb9e632ffe\"},{\"properties\":{\"roleName\":\"Hierarchy + Settings Administrator\",\"type\":\"BuiltInRole\",\"description\":\"Allows + users to edit and delete Hierarchy Settings\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Management/managementGroups/settings/write\",\"Microsoft.Management/managementGroups/settings/delete\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-03-13T23:55:11.0212387Z\",\"updatedOn\":\"2020-03-13T23:58:46.9249866Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/350f8d15-c687-4448-8ae1-157740a3936d\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"350f8d15-c687-4448-8ae1-157740a3936d\"},{\"properties\":{\"roleName\":\"FHIR + Data Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Role allows + user or principal full access to FHIR Data\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.HealthcareApis/services/fhir/resources/*\"],\"notDataActions\":[]}],\"createdOn\":\"2020-03-17T18:35:04.4949547Z\",\"updatedOn\":\"2020-03-17T18:35:04.4949547Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/5a1fc7df-4bf1-4951-a576-89034ee01acd\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"5a1fc7df-4bf1-4951-a576-89034ee01acd\"},{\"properties\":{\"roleName\":\"FHIR + Data Exporter\",\"type\":\"BuiltInRole\",\"description\":\"Role allows user + or principal to read and export FHIR Data\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.HealthcareApis/services/fhir/resources/read\",\"Microsoft.HealthcareApis/services/fhir/resources/export/action\"],\"notDataActions\":[]}],\"createdOn\":\"2020-03-17T18:45:01.9764073Z\",\"updatedOn\":\"2020-03-19T20:29:56.9958536Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3db33094-8700-4567-8da5-1501d4e7e843\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"3db33094-8700-4567-8da5-1501d4e7e843\"},{\"properties\":{\"roleName\":\"FHIR + Data Reader\",\"type\":\"BuiltInRole\",\"description\":\"Role allows user + or principal to read FHIR Data\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.HealthcareApis/services/fhir/resources/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-03-17T18:49:04.8353499Z\",\"updatedOn\":\"2020-03-17T18:49:04.8353499Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4c8d0bbc-75d3-4935-991f-5f3c56d81508\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"4c8d0bbc-75d3-4935-991f-5f3c56d81508\"},{\"properties\":{\"roleName\":\"FHIR + Data Writer\",\"type\":\"BuiltInRole\",\"description\":\"Role allows user + or principal to read and write FHIR Data\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.HealthcareApis/services/fhir/resources/*\"],\"notDataActions\":[\"Microsoft.HealthcareApis/services/fhir/resources/hardDelete/action\"]}],\"createdOn\":\"2020-03-17T18:55:35.2413335Z\",\"updatedOn\":\"2020-03-17T18:55:35.2413335Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3f88fce4-5892-4214-ae73-ba5294559913\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"3f88fce4-5892-4214-ae73-ba5294559913\"},{\"properties\":{\"roleName\":\"Experimentation + Reader\",\"type\":\"BuiltInRole\",\"description\":\"Experimentation Reader\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Experimentation/experimentWorkspaces/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Experimentation/experimentWorkspaces/read\",\"Microsoft.Experimentation/experimentWorkspaces/experimentationGroups/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-03-25T18:05:14.8375678Z\",\"updatedOn\":\"2021-01-11T18:32:43.8283983Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/49632ef5-d9ac-41f4-b8e7-bbe587fa74a1\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"49632ef5-d9ac-41f4-b8e7-bbe587fa74a1\"},{\"properties\":{\"roleName\":\"Object + Understanding Account Owner\",\"type\":\"BuiltInRole\",\"description\":\"Provides + user with ingestion capabilities for Azure Object Understanding.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.MixedReality/ObjectUnderstandingAccounts/ingest/action\",\"Microsoft.MixedReality/ObjectUnderstandingAccounts/ingest/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-04-22T19:15:09.0697923Z\",\"updatedOn\":\"2020-04-22T19:15:09.0697923Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4dd61c23-6743-42fe-a388-d8bdd41cb745\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"4dd61c23-6743-42fe-a388-d8bdd41cb745\"},{\"properties\":{\"roleName\":\"Azure + Maps Data Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Grants + access to read, write, and delete access to map related data from an Azure + maps account.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Maps/accounts/*/read\",\"Microsoft.Maps/accounts/*/write\",\"Microsoft.Maps/accounts/*/delete\"],\"notDataActions\":[]}],\"createdOn\":\"2020-05-07T20:55:05.0645410Z\",\"updatedOn\":\"2020-05-07T20:55:05.0645410Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8f5e0ce6-4f7b-4dcf-bddf-e6f48634a204\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"8f5e0ce6-4f7b-4dcf-bddf-e6f48634a204\"},{\"properties\":{\"roleName\":\"Cognitive + Services Custom Vision Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Full + access to the project, including the ability to view, create, edit, or delete + projects.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.CognitiveServices/*/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.CognitiveServices/accounts/CustomVision/*\"],\"notDataActions\":[]}],\"createdOn\":\"2020-05-08T23:47:07.0779345Z\",\"updatedOn\":\"2020-05-08T23:47:07.0779345Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/c1ff6cc2-c111-46fe-8896-e0ef812ad9f3\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"c1ff6cc2-c111-46fe-8896-e0ef812ad9f3\"},{\"properties\":{\"roleName\":\"Cognitive + Services Custom Vision Deployment\",\"type\":\"BuiltInRole\",\"description\":\"Publish, + unpublish or export models. Deployment can view the project but can\u2019t + update.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.CognitiveServices/*/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.CognitiveServices/accounts/CustomVision/*/read\",\"Microsoft.CognitiveServices/accounts/CustomVision/projects/predictions/*\",\"Microsoft.CognitiveServices/accounts/CustomVision/projects/iterations/publish/*\",\"Microsoft.CognitiveServices/accounts/CustomVision/projects/iterations/export/*\",\"Microsoft.CognitiveServices/accounts/CustomVision/projects/quicktest/*\",\"Microsoft.CognitiveServices/accounts/CustomVision/classify/*\",\"Microsoft.CognitiveServices/accounts/CustomVision/detect/*\"],\"notDataActions\":[\"Microsoft.CognitiveServices/accounts/CustomVision/projects/export/read\"]}],\"createdOn\":\"2020-05-09T01:31:05.9528620Z\",\"updatedOn\":\"2020-05-09T01:31:05.9528620Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/5c4089e1-6d96-4d2f-b296-c1bc7137275f\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"5c4089e1-6d96-4d2f-b296-c1bc7137275f\"},{\"properties\":{\"roleName\":\"Cognitive + Services Custom Vision Labeler\",\"type\":\"BuiltInRole\",\"description\":\"View, + edit training images and create, add, remove, or delete the image tags. Labelers + can view the project but can\u2019t update anything other than training images + and tags.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.CognitiveServices/*/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.CognitiveServices/accounts/CustomVision/*/read\",\"Microsoft.CognitiveServices/accounts/CustomVision/projects/predictions/query/action\",\"Microsoft.CognitiveServices/accounts/CustomVision/projects/images/*\",\"Microsoft.CognitiveServices/accounts/CustomVision/projects/tags/*\",\"Microsoft.CognitiveServices/accounts/CustomVision/projects/images/suggested/*\",\"Microsoft.CognitiveServices/accounts/CustomVision/projects/tagsandregions/suggestions/action\"],\"notDataActions\":[\"Microsoft.CognitiveServices/accounts/CustomVision/projects/export/read\"]}],\"createdOn\":\"2020-05-09T01:33:20.8278896Z\",\"updatedOn\":\"2020-05-09T01:33:20.8278896Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/88424f51-ebe7-446f-bc41-7fa16989e96c\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"88424f51-ebe7-446f-bc41-7fa16989e96c\"},{\"properties\":{\"roleName\":\"Cognitive + Services Custom Vision Reader\",\"type\":\"BuiltInRole\",\"description\":\"Read-only + actions in the project. Readers can\u2019t create or update the project.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.CognitiveServices/*/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.CognitiveServices/accounts/CustomVision/*/read\",\"Microsoft.CognitiveServices/accounts/CustomVision/projects/predictions/query/action\"],\"notDataActions\":[\"Microsoft.CognitiveServices/accounts/CustomVision/projects/export/read\"]}],\"createdOn\":\"2020-05-09T01:34:18.5328818Z\",\"updatedOn\":\"2020-05-09T01:34:18.5328818Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/93586559-c37d-4a6b-ba08-b9f0940c2d73\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"93586559-c37d-4a6b-ba08-b9f0940c2d73\"},{\"properties\":{\"roleName\":\"Cognitive + Services Custom Vision Trainer\",\"type\":\"BuiltInRole\",\"description\":\"View, + edit projects and train the models, including the ability to publish, unpublish, + export the models. Trainers can\u2019t create or delete the project.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.CognitiveServices/*/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.CognitiveServices/accounts/CustomVision/*\"],\"notDataActions\":[\"Microsoft.CognitiveServices/accounts/CustomVision/projects/action\",\"Microsoft.CognitiveServices/accounts/CustomVision/projects/delete\",\"Microsoft.CognitiveServices/accounts/CustomVision/projects/import/action\",\"Microsoft.CognitiveServices/accounts/CustomVision/projects/export/read\"]}],\"createdOn\":\"2020-05-09T01:35:13.8147804Z\",\"updatedOn\":\"2020-05-09T01:35:13.8147804Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/0a5ae4ab-0d65-4eeb-be61-29fc9b54394b\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"0a5ae4ab-0d65-4eeb-be61-29fc9b54394b\"},{\"properties\":{\"roleName\":\"Key + Vault Administrator\",\"type\":\"BuiltInRole\",\"description\":\"Perform all + data plane operations on a key vault and all objects in it, including certificates, + keys, and secrets. Cannot manage key vault resources or manage role assignments. + Only works for key vaults that use the 'Azure role-based access control' permission + model.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.KeyVault/checkNameAvailability/read\",\"Microsoft.KeyVault/deletedVaults/read\",\"Microsoft.KeyVault/locations/*/read\",\"Microsoft.KeyVault/vaults/*/read\",\"Microsoft.KeyVault/operations/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.KeyVault/vaults/*\"],\"notDataActions\":[]}],\"createdOn\":\"2020-05-19T17:52:46.2349235Z\",\"updatedOn\":\"2021-01-27T23:26:39.6321098Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/00482a5a-887f-4fb3-b363-3b7fe8e74483\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"00482a5a-887f-4fb3-b363-3b7fe8e74483\"},{\"properties\":{\"roleName\":\"Key + Vault Crypto Officer\",\"type\":\"BuiltInRole\",\"description\":\"Perform + any action on the keys of a key vault, except manage permissions. Only works + for key vaults that use the 'Azure role-based access control' permission model.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.KeyVault/checkNameAvailability/read\",\"Microsoft.KeyVault/deletedVaults/read\",\"Microsoft.KeyVault/locations/*/read\",\"Microsoft.KeyVault/vaults/*/read\",\"Microsoft.KeyVault/operations/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.KeyVault/vaults/keys/*\"],\"notDataActions\":[]}],\"createdOn\":\"2020-05-19T17:52:47.0099249Z\",\"updatedOn\":\"2021-01-27T23:23:43.2358783Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/14b46e9e-c2b7-41b4-b07b-48a6ebf60603\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"14b46e9e-c2b7-41b4-b07b-48a6ebf60603\"},{\"properties\":{\"roleName\":\"Key + Vault Crypto User\",\"type\":\"BuiltInRole\",\"description\":\"Perform cryptographic + operations using keys. Only works for key vaults that use the 'Azure role-based + access control' permission model.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.KeyVault/vaults/keys/read\",\"Microsoft.KeyVault/vaults/keys/update/action\",\"Microsoft.KeyVault/vaults/keys/backup/action\",\"Microsoft.KeyVault/vaults/keys/encrypt/action\",\"Microsoft.KeyVault/vaults/keys/decrypt/action\",\"Microsoft.KeyVault/vaults/keys/wrap/action\",\"Microsoft.KeyVault/vaults/keys/unwrap/action\",\"Microsoft.KeyVault/vaults/keys/sign/action\",\"Microsoft.KeyVault/vaults/keys/verify/action\"],\"notDataActions\":[]}],\"createdOn\":\"2020-05-19T17:52:47.0699268Z\",\"updatedOn\":\"2021-01-27T23:18:47.5002809Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/12338af0-0e69-4776-bea7-57ae8d297424\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"12338af0-0e69-4776-bea7-57ae8d297424\"},{\"properties\":{\"roleName\":\"Key + Vault Secrets Officer\",\"type\":\"BuiltInRole\",\"description\":\"Perform + any action on the secrets of a key vault, except manage permissions. Only + works for key vaults that use the 'Azure role-based access control' permission + model.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.KeyVault/checkNameAvailability/read\",\"Microsoft.KeyVault/deletedVaults/read\",\"Microsoft.KeyVault/locations/*/read\",\"Microsoft.KeyVault/vaults/*/read\",\"Microsoft.KeyVault/operations/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.KeyVault/vaults/secrets/*\"],\"notDataActions\":[]}],\"createdOn\":\"2020-05-19T17:52:47.1449242Z\",\"updatedOn\":\"2021-01-27T23:07:56.2221281Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b86a8fe4-44ce-4948-aee5-eccb2c155cd7\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b86a8fe4-44ce-4948-aee5-eccb2c155cd7\"},{\"properties\":{\"roleName\":\"Key + Vault Secrets User\",\"type\":\"BuiltInRole\",\"description\":\"Read secret + contents. Only works for key vaults that use the 'Azure role-based access + control' permission model.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.KeyVault/vaults/secrets/getSecret/action\",\"Microsoft.KeyVault/vaults/secrets/readMetadata/action\"],\"notDataActions\":[]}],\"createdOn\":\"2020-05-19T17:52:47.2049241Z\",\"updatedOn\":\"2021-01-27T22:15:29.1682455Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4633458b-17de-408a-b874-0445c86b69e6\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"4633458b-17de-408a-b874-0445c86b69e6\"},{\"properties\":{\"roleName\":\"Key + Vault Certificates Officer\",\"type\":\"BuiltInRole\",\"description\":\"Perform + any action on the certificates of a key vault, except manage permissions. + Only works for key vaults that use the 'Azure role-based access control' permission + model.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.KeyVault/checkNameAvailability/read\",\"Microsoft.KeyVault/deletedVaults/read\",\"Microsoft.KeyVault/locations/*/read\",\"Microsoft.KeyVault/vaults/*/read\",\"Microsoft.KeyVault/operations/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.KeyVault/vaults/certificatecas/*\",\"Microsoft.KeyVault/vaults/certificates/*\"],\"notDataActions\":[]}],\"createdOn\":\"2020-05-19T17:52:47.2499247Z\",\"updatedOn\":\"2021-01-27T23:25:14.4723643Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/a4417e6f-fecd-4de8-b567-7b0420556985\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"a4417e6f-fecd-4de8-b567-7b0420556985\"},{\"properties\":{\"roleName\":\"Key + Vault Reader\",\"type\":\"BuiltInRole\",\"description\":\"Read metadata of + key vaults and its certificates, keys, and secrets. Cannot read sensitive + values such as secret contents or key material. Only works for key vaults + that use the 'Azure role-based access control' permission model.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.KeyVault/checkNameAvailability/read\",\"Microsoft.KeyVault/deletedVaults/read\",\"Microsoft.KeyVault/locations/*/read\",\"Microsoft.KeyVault/vaults/*/read\",\"Microsoft.KeyVault/operations/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.KeyVault/vaults/*/read\",\"Microsoft.KeyVault/vaults/secrets/readMetadata/action\"],\"notDataActions\":[]}],\"createdOn\":\"2020-05-19T17:52:47.2949294Z\",\"updatedOn\":\"2021-01-27T23:14:42.7151440Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/21090545-7ca7-4776-b22c-e363652d74d2\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"21090545-7ca7-4776-b22c-e363652d74d2\"},{\"properties\":{\"roleName\":\"Key + Vault Crypto Service Encryption User\",\"type\":\"BuiltInRole\",\"description\":\"Read + metadata of keys and perform wrap/unwrap operations. Only works for key vaults + that use the 'Azure role-based access control' permission model.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.EventGrid/eventSubscriptions/write\",\"Microsoft.EventGrid/eventSubscriptions/read\",\"Microsoft.EventGrid/eventSubscriptions/delete\"],\"notActions\":[],\"dataActions\":[\"Microsoft.KeyVault/vaults/keys/read\",\"Microsoft.KeyVault/vaults/keys/wrap/action\",\"Microsoft.KeyVault/vaults/keys/unwrap/action\"],\"notDataActions\":[]}],\"createdOn\":\"2020-05-20T20:55:19.2398470Z\",\"updatedOn\":\"2021-01-27T23:22:10.9466372Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/e147488a-f6f5-4113-8e2d-b22465e65bf6\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"e147488a-f6f5-4113-8e2d-b22465e65bf6\"},{\"properties\":{\"roleName\":\"Azure + Arc Kubernetes Viewer\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + view all resources in cluster/namespace, except secrets.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/write\",\"Microsoft.Resources/subscriptions/operationresults/read\",\"Microsoft.Resources/subscriptions/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Kubernetes/connectedClusters/apps/controllerrevisions/read\",\"Microsoft.Kubernetes/connectedClusters/apps/daemonsets/read\",\"Microsoft.Kubernetes/connectedClusters/apps/deployments/read\",\"Microsoft.Kubernetes/connectedClusters/apps/replicasets/read\",\"Microsoft.Kubernetes/connectedClusters/apps/statefulsets/read\",\"Microsoft.Kubernetes/connectedClusters/autoscaling/horizontalpodautoscalers/read\",\"Microsoft.Kubernetes/connectedClusters/batch/cronjobs/read\",\"Microsoft.Kubernetes/connectedClusters/batch/jobs/read\",\"Microsoft.Kubernetes/connectedClusters/configmaps/read\",\"Microsoft.Kubernetes/connectedClusters/endpoints/read\",\"Microsoft.Kubernetes/connectedClusters/events.k8s.io/events/read\",\"Microsoft.Kubernetes/connectedClusters/events/read\",\"Microsoft.Kubernetes/connectedClusters/extensions/daemonsets/read\",\"Microsoft.Kubernetes/connectedClusters/extensions/deployments/read\",\"Microsoft.Kubernetes/connectedClusters/extensions/ingresses/read\",\"Microsoft.Kubernetes/connectedClusters/extensions/networkpolicies/read\",\"Microsoft.Kubernetes/connectedClusters/extensions/replicasets/read\",\"Microsoft.Kubernetes/connectedClusters/limitranges/read\",\"Microsoft.Kubernetes/connectedClusters/namespaces/read\",\"Microsoft.Kubernetes/connectedClusters/networking.k8s.io/ingresses/read\",\"Microsoft.Kubernetes/connectedClusters/networking.k8s.io/networkpolicies/read\",\"Microsoft.Kubernetes/connectedClusters/persistentvolumeclaims/read\",\"Microsoft.Kubernetes/connectedClusters/pods/read\",\"Microsoft.Kubernetes/connectedClusters/policy/poddisruptionbudgets/read\",\"Microsoft.Kubernetes/connectedClusters/replicationcontrollers/read\",\"Microsoft.Kubernetes/connectedClusters/replicationcontrollers/read\",\"Microsoft.Kubernetes/connectedClusters/resourcequotas/read\",\"Microsoft.Kubernetes/connectedClusters/serviceaccounts/read\",\"Microsoft.Kubernetes/connectedClusters/services/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-06-12T20:51:12.8801199Z\",\"updatedOn\":\"2020-11-02T23:50:46.3225174Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/63f0a09d-1495-4db4-a681-037d84835eb4\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"63f0a09d-1495-4db4-a681-037d84835eb4\"},{\"properties\":{\"roleName\":\"Azure + Arc Kubernetes Writer\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + update everything in cluster/namespace, except (cluster)roles and (cluster)role + bindings.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/write\",\"Microsoft.Resources/subscriptions/operationresults/read\",\"Microsoft.Resources/subscriptions/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Kubernetes/connectedClusters/apps/controllerrevisions/read\",\"Microsoft.Kubernetes/connectedClusters/apps/daemonsets/*\",\"Microsoft.Kubernetes/connectedClusters/apps/deployments/*\",\"Microsoft.Kubernetes/connectedClusters/apps/replicasets/*\",\"Microsoft.Kubernetes/connectedClusters/apps/statefulsets/*\",\"Microsoft.Kubernetes/connectedClusters/autoscaling/horizontalpodautoscalers/*\",\"Microsoft.Kubernetes/connectedClusters/batch/cronjobs/*\",\"Microsoft.Kubernetes/connectedClusters/batch/jobs/*\",\"Microsoft.Kubernetes/connectedClusters/configmaps/*\",\"Microsoft.Kubernetes/connectedClusters/endpoints/*\",\"Microsoft.Kubernetes/connectedClusters/events.k8s.io/events/read\",\"Microsoft.Kubernetes/connectedClusters/events/read\",\"Microsoft.Kubernetes/connectedClusters/extensions/daemonsets/*\",\"Microsoft.Kubernetes/connectedClusters/extensions/deployments/*\",\"Microsoft.Kubernetes/connectedClusters/extensions/ingresses/*\",\"Microsoft.Kubernetes/connectedClusters/extensions/networkpolicies/*\",\"Microsoft.Kubernetes/connectedClusters/extensions/replicasets/*\",\"Microsoft.Kubernetes/connectedClusters/limitranges/read\",\"Microsoft.Kubernetes/connectedClusters/namespaces/read\",\"Microsoft.Kubernetes/connectedClusters/networking.k8s.io/ingresses/*\",\"Microsoft.Kubernetes/connectedClusters/networking.k8s.io/networkpolicies/*\",\"Microsoft.Kubernetes/connectedClusters/persistentvolumeclaims/*\",\"Microsoft.Kubernetes/connectedClusters/pods/*\",\"Microsoft.Kubernetes/connectedClusters/policy/poddisruptionbudgets/*\",\"Microsoft.Kubernetes/connectedClusters/replicationcontrollers/*\",\"Microsoft.Kubernetes/connectedClusters/replicationcontrollers/*\",\"Microsoft.Kubernetes/connectedClusters/resourcequotas/read\",\"Microsoft.Kubernetes/connectedClusters/secrets/*\",\"Microsoft.Kubernetes/connectedClusters/serviceaccounts/*\",\"Microsoft.Kubernetes/connectedClusters/services/*\"],\"notDataActions\":[]}],\"createdOn\":\"2020-06-12T20:53:50.6749823Z\",\"updatedOn\":\"2020-11-02T23:48:04.7027508Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/5b999177-9696-4545-85c7-50de3797e5a1\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"5b999177-9696-4545-85c7-50de3797e5a1\"},{\"properties\":{\"roleName\":\"Azure + Arc Kubernetes Cluster Admin\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you manage all resources in the cluster.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/write\",\"Microsoft.Resources/subscriptions/operationresults/read\",\"Microsoft.Resources/subscriptions/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Kubernetes/connectedClusters/*\"],\"notDataActions\":[]}],\"createdOn\":\"2020-06-12T20:55:30.9910462Z\",\"updatedOn\":\"2020-06-12T20:55:30.9910462Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8393591c-06b9-48a2-a542-1bd6b377f6a2\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"8393591c-06b9-48a2-a542-1bd6b377f6a2\"},{\"properties\":{\"roleName\":\"Azure + Arc Kubernetes Admin\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + manage all resources under cluster/namespace, except update or delete resource + quotas and namespaces.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/write\",\"Microsoft.Resources/subscriptions/operationresults/read\",\"Microsoft.Resources/subscriptions/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Kubernetes/connectedClusters/apps/controllerrevisions/read\",\"Microsoft.Kubernetes/connectedClusters/apps/daemonsets/*\",\"Microsoft.Kubernetes/connectedClusters/apps/deployments/*\",\"Microsoft.Kubernetes/connectedClusters/apps/replicasets/*\",\"Microsoft.Kubernetes/connectedClusters/apps/statefulsets/*\",\"Microsoft.Kubernetes/connectedClusters/authorization.k8s.io/localsubjectaccessreviews/write\",\"Microsoft.Kubernetes/connectedClusters/autoscaling/horizontalpodautoscalers/*\",\"Microsoft.Kubernetes/connectedClusters/batch/cronjobs/*\",\"Microsoft.Kubernetes/connectedClusters/batch/jobs/*\",\"Microsoft.Kubernetes/connectedClusters/configmaps/*\",\"Microsoft.Kubernetes/connectedClusters/endpoints/*\",\"Microsoft.Kubernetes/connectedClusters/events.k8s.io/events/read\",\"Microsoft.Kubernetes/connectedClusters/events/read\",\"Microsoft.Kubernetes/connectedClusters/extensions/daemonsets/*\",\"Microsoft.Kubernetes/connectedClusters/extensions/deployments/*\",\"Microsoft.Kubernetes/connectedClusters/extensions/ingresses/*\",\"Microsoft.Kubernetes/connectedClusters/extensions/networkpolicies/*\",\"Microsoft.Kubernetes/connectedClusters/extensions/replicasets/*\",\"Microsoft.Kubernetes/connectedClusters/limitranges/read\",\"Microsoft.Kubernetes/connectedClusters/namespaces/read\",\"Microsoft.Kubernetes/connectedClusters/networking.k8s.io/ingresses/*\",\"Microsoft.Kubernetes/connectedClusters/networking.k8s.io/networkpolicies/*\",\"Microsoft.Kubernetes/connectedClusters/persistentvolumeclaims/*\",\"Microsoft.Kubernetes/connectedClusters/pods/*\",\"Microsoft.Kubernetes/connectedClusters/policy/poddisruptionbudgets/*\",\"Microsoft.Kubernetes/connectedClusters/rbac.authorization.k8s.io/rolebindings/*\",\"Microsoft.Kubernetes/connectedClusters/rbac.authorization.k8s.io/roles/*\",\"Microsoft.Kubernetes/connectedClusters/replicationcontrollers/*\",\"Microsoft.Kubernetes/connectedClusters/replicationcontrollers/*\",\"Microsoft.Kubernetes/connectedClusters/resourcequotas/read\",\"Microsoft.Kubernetes/connectedClusters/secrets/*\",\"Microsoft.Kubernetes/connectedClusters/serviceaccounts/*\",\"Microsoft.Kubernetes/connectedClusters/services/*\"],\"notDataActions\":[]}],\"createdOn\":\"2020-06-12T20:57:06.0391177Z\",\"updatedOn\":\"2020-11-02T23:52:48.6202974Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/dffb1e0c-446f-4dde-a09f-99eb5cc68b96\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"dffb1e0c-446f-4dde-a09f-99eb5cc68b96\"},{\"properties\":{\"roleName\":\"Azure + Kubernetes Service RBAC Cluster Admin\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you manage all resources in the cluster.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/write\",\"Microsoft.Resources/subscriptions/operationresults/read\",\"Microsoft.Resources/subscriptions/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.ContainerService/managedClusters/listClusterUserCredential/action\"],\"notActions\":[],\"dataActions\":[\"Microsoft.ContainerService/managedClusters/*\"],\"notDataActions\":[]}],\"createdOn\":\"2020-07-02T17:47:24.4071415Z\",\"updatedOn\":\"2020-07-02T17:47:24.4071415Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b1ff04bb-8a4e-4dc4-8eb5-8693973ce19b\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b1ff04bb-8a4e-4dc4-8eb5-8693973ce19b\"},{\"properties\":{\"roleName\":\"Azure + Kubernetes Service RBAC Admin\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you manage all resources under cluster/namespace, except update or delete + resource quotas and namespaces.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/write\",\"Microsoft.Resources/subscriptions/operationresults/read\",\"Microsoft.Resources/subscriptions/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.ContainerService/managedClusters/listClusterUserCredential/action\"],\"notActions\":[],\"dataActions\":[\"Microsoft.ContainerService/managedClusters/*\"],\"notDataActions\":[\"Microsoft.ContainerService/managedClusters/resourcequotas/write\",\"Microsoft.ContainerService/managedClusters/resourcequotas/delete\",\"Microsoft.ContainerService/managedClusters/namespaces/write\",\"Microsoft.ContainerService/managedClusters/namespaces/delete\"]}],\"createdOn\":\"2020-07-02T17:50:30.4020311Z\",\"updatedOn\":\"2020-07-02T17:50:30.4020311Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3498e952-d568-435e-9b2c-8d77e338d7f7\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"3498e952-d568-435e-9b2c-8d77e338d7f7\"},{\"properties\":{\"roleName\":\"Azure + Kubernetes Service RBAC Reader\",\"type\":\"BuiltInRole\",\"description\":\"Allows + read-only access to see most objects in a namespace. It does not allow viewing + roles or role bindings. This role does not allow viewing Secrets, since reading + the contents of Secrets enables access to ServiceAccount credentials in the + namespace, which would allow API access as any ServiceAccount in the namespace + (a form of privilege escalation). Applying this role at cluster scope will + give access across all namespaces.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/write\",\"Microsoft.Resources/subscriptions/operationresults/read\",\"Microsoft.Resources/subscriptions/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[\"Microsoft.ContainerService/managedClusters/apps/controllerrevisions/read\",\"Microsoft.ContainerService/managedClusters/apps/daemonsets/read\",\"Microsoft.ContainerService/managedClusters/apps/deployments/read\",\"Microsoft.ContainerService/managedClusters/apps/replicasets/read\",\"Microsoft.ContainerService/managedClusters/apps/statefulsets/read\",\"Microsoft.ContainerService/managedClusters/autoscaling/horizontalpodautoscalers/read\",\"Microsoft.ContainerService/managedClusters/batch/cronjobs/read\",\"Microsoft.ContainerService/managedClusters/batch/jobs/read\",\"Microsoft.ContainerService/managedClusters/configmaps/read\",\"Microsoft.ContainerService/managedClusters/endpoints/read\",\"Microsoft.ContainerService/managedClusters/events.k8s.io/events/read\",\"Microsoft.ContainerService/managedClusters/events/read\",\"Microsoft.ContainerService/managedClusters/extensions/daemonsets/read\",\"Microsoft.ContainerService/managedClusters/extensions/deployments/read\",\"Microsoft.ContainerService/managedClusters/extensions/ingresses/read\",\"Microsoft.ContainerService/managedClusters/extensions/networkpolicies/read\",\"Microsoft.ContainerService/managedClusters/extensions/replicasets/read\",\"Microsoft.ContainerService/managedClusters/limitranges/read\",\"Microsoft.ContainerService/managedClusters/namespaces/read\",\"Microsoft.ContainerService/managedClusters/networking.k8s.io/ingresses/read\",\"Microsoft.ContainerService/managedClusters/networking.k8s.io/networkpolicies/read\",\"Microsoft.ContainerService/managedClusters/persistentvolumeclaims/read\",\"Microsoft.ContainerService/managedClusters/pods/read\",\"Microsoft.ContainerService/managedClusters/policy/poddisruptionbudgets/read\",\"Microsoft.ContainerService/managedClusters/replicationcontrollers/read\",\"Microsoft.ContainerService/managedClusters/replicationcontrollers/read\",\"Microsoft.ContainerService/managedClusters/resourcequotas/read\",\"Microsoft.ContainerService/managedClusters/serviceaccounts/read\",\"Microsoft.ContainerService/managedClusters/services/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-07-02T17:53:05.5728294Z\",\"updatedOn\":\"2020-10-22T16:08:11.1332215Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/7f6c6a51-bcf8-42ba-9220-52d62157d7db\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"7f6c6a51-bcf8-42ba-9220-52d62157d7db\"},{\"properties\":{\"roleName\":\"Azure + Kubernetes Service RBAC Writer\",\"type\":\"BuiltInRole\",\"description\":\"Allows + read/write access to most objects in a namespace.This role does not allow + viewing or modifying roles or role bindings. However, this role allows accessing + Secrets and running Pods as any ServiceAccount in the namespace, so it can + be used to gain the API access levels of any ServiceAccount in the namespace. + Applying this role at cluster scope will give access across all namespaces.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/write\",\"Microsoft.Resources/subscriptions/operationresults/read\",\"Microsoft.Resources/subscriptions/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[\"Microsoft.ContainerService/managedClusters/apps/controllerrevisions/read\",\"Microsoft.ContainerService/managedClusters/apps/daemonsets/*\",\"Microsoft.ContainerService/managedClusters/apps/deployments/*\",\"Microsoft.ContainerService/managedClusters/apps/replicasets/*\",\"Microsoft.ContainerService/managedClusters/apps/statefulsets/*\",\"Microsoft.ContainerService/managedClusters/autoscaling/horizontalpodautoscalers/*\",\"Microsoft.ContainerService/managedClusters/batch/cronjobs/*\",\"Microsoft.ContainerService/managedClusters/batch/jobs/*\",\"Microsoft.ContainerService/managedClusters/configmaps/*\",\"Microsoft.ContainerService/managedClusters/endpoints/*\",\"Microsoft.ContainerService/managedClusters/events.k8s.io/events/read\",\"Microsoft.ContainerService/managedClusters/events/read\",\"Microsoft.ContainerService/managedClusters/extensions/daemonsets/*\",\"Microsoft.ContainerService/managedClusters/extensions/deployments/*\",\"Microsoft.ContainerService/managedClusters/extensions/ingresses/*\",\"Microsoft.ContainerService/managedClusters/extensions/networkpolicies/*\",\"Microsoft.ContainerService/managedClusters/extensions/replicasets/*\",\"Microsoft.ContainerService/managedClusters/limitranges/read\",\"Microsoft.ContainerService/managedClusters/namespaces/read\",\"Microsoft.ContainerService/managedClusters/networking.k8s.io/ingresses/*\",\"Microsoft.ContainerService/managedClusters/networking.k8s.io/networkpolicies/*\",\"Microsoft.ContainerService/managedClusters/persistentvolumeclaims/*\",\"Microsoft.ContainerService/managedClusters/pods/*\",\"Microsoft.ContainerService/managedClusters/policy/poddisruptionbudgets/*\",\"Microsoft.ContainerService/managedClusters/replicationcontrollers/*\",\"Microsoft.ContainerService/managedClusters/replicationcontrollers/*\",\"Microsoft.ContainerService/managedClusters/resourcequotas/read\",\"Microsoft.ContainerService/managedClusters/secrets/*\",\"Microsoft.ContainerService/managedClusters/serviceaccounts/*\",\"Microsoft.ContainerService/managedClusters/services/*\"],\"notDataActions\":[]}],\"createdOn\":\"2020-07-02T17:54:51.9644983Z\",\"updatedOn\":\"2020-10-22T16:10:35.0181117Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/a7ffa36f-339b-4b5c-8bdf-e2c188b2c0eb\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"a7ffa36f-339b-4b5c-8bdf-e2c188b2c0eb\"},{\"properties\":{\"roleName\":\"Services + Hub Operator\",\"type\":\"BuiltInRole\",\"description\":\"Services Hub Operator + allows you to perform all read, write, and deletion operations related to + Services Hub Connectors.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.ServicesHub/connectors/write\",\"Microsoft.ServicesHub/connectors/read\",\"Microsoft.ServicesHub/connectors/delete\",\"Microsoft.ServicesHub/connectors/checkAssessmentEntitlement/action\",\"Microsoft.ServicesHub/supportOfferingEntitlement/read\",\"Microsoft.ServicesHub/workspaces/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-07-20T17:57:22.0644902Z\",\"updatedOn\":\"2020-10-06T17:18:28.4647301Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/82200a5b-e217-47a5-b665-6d8765ee745b\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"82200a5b-e217-47a5-b665-6d8765ee745b\"},{\"properties\":{\"roleName\":\"Object + Understanding Account Reader\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you read ingestion jobs for an object understanding account.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.MixedReality/ObjectUnderstandingAccounts/ingest/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-07-23T19:16:31.9929119Z\",\"updatedOn\":\"2020-07-23T19:16:31.9929119Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/d18777c0-1514-4662-8490-608db7d334b6\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"d18777c0-1514-4662-8490-608db7d334b6\"},{\"properties\":{\"roleName\":\"Azure + Arc Enabled Kubernetes Cluster User Role\",\"type\":\"BuiltInRole\",\"description\":\"List + cluster user credentials action.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Resources/deployments/write\",\"Microsoft.Resources/subscriptions/operationresults/read\",\"Microsoft.Resources/subscriptions/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Kubernetes/connectedClusters/listClusterUserCredentials/action\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-07-28T17:37:00.7637445Z\",\"updatedOn\":\"2020-07-30T18:00:32.2764334Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/00493d72-78f6-4148-b6c5-d3ce8e4799dd\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"00493d72-78f6-4148-b6c5-d3ce8e4799dd\"},{\"properties\":{\"roleName\":\"SignalR + App Server (Preview)\",\"type\":\"BuiltInRole\",\"description\":\"Lets your + app server access SignalR Service with AAD auth options.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.SignalRService/SignalR/auth/accessKey/action\",\"Microsoft.SignalRService/SignalR/serverConnection/write\"],\"notDataActions\":[]}],\"createdOn\":\"2020-07-29T06:54:40.1201435Z\",\"updatedOn\":\"2020-10-23T08:23:46.8454102Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/420fcaa2-552c-430f-98ca-3264be4806c7\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"420fcaa2-552c-430f-98ca-3264be4806c7\"},{\"properties\":{\"roleName\":\"SignalR + Serverless Contributor (Preview)\",\"type\":\"BuiltInRole\",\"description\":\"Lets + your app access service in serverless mode with AAD auth options.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.SignalRService/SignalR/auth/clientToken/action\"],\"notDataActions\":[]}],\"createdOn\":\"2020-07-29T09:35:32.2764751Z\",\"updatedOn\":\"2020-10-23T08:24:24.5713531Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/fd53cd77-2268-407a-8f46-7e7863d0f521\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"fd53cd77-2268-407a-8f46-7e7863d0f521\"},{\"properties\":{\"roleName\":\"Collaborative + Data Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Can manage data + packages of a collaborative.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.IndustryDataLifecycle/custodianCollaboratives/*/read\",\"Microsoft.IndustryDataLifecycle/memberCollaboratives/*/read\",\"Microsoft.IndustryDataLifecycle/locations/dataPackages/*\",\"Microsoft.IndustryDataLifecycle/custodianCollaboratives/receivedDataPackages/*\",\"Microsoft.IndustryDataLifecycle/custodianCollaboratives/rejectDataPackage/action\",\"Microsoft.IndustryDataLifecycle/memberCollaboratives/sharedDataPackages/*\",\"Microsoft.IndustryDataLifecycle/custodianCollaboratives/dataModels/*\",\"Microsoft.IndustryDataLifecycle/custodianCollaboratives/auditLogs/action\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-08-14T11:58:31.8973556Z\",\"updatedOn\":\"2021-03-17T06:19:53.4915361Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/daa9e50b-21df-454c-94a6-a8050adab352\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"daa9e50b-21df-454c-94a6-a8050adab352\"},{\"properties\":{\"roleName\":\"Device + Update Reader\",\"type\":\"BuiltInRole\",\"description\":\"Gives you read + access to management and content operations, but does not allow making changes\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.Insights/alertRules/*\"],\"notActions\":[],\"dataActions\":[\"Microsoft.DeviceUpdate/accounts/instances/updates/read\",\"Microsoft.DeviceUpdate/accounts/instances/management/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-08-21T23:40:19.2373610Z\",\"updatedOn\":\"2020-08-21T23:40:19.2373610Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/e9dba6fb-3d52-4cf0-bce3-f06ce71b9e0f\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"e9dba6fb-3d52-4cf0-bce3-f06ce71b9e0f\"},{\"properties\":{\"roleName\":\"Device + Update Administrator\",\"type\":\"BuiltInRole\",\"description\":\"Gives you + full access to management and content operations\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.Insights/alertRules/*\"],\"notActions\":[],\"dataActions\":[\"Microsoft.DeviceUpdate/accounts/instances/updates/read\",\"Microsoft.DeviceUpdate/accounts/instances/updates/write\",\"Microsoft.DeviceUpdate/accounts/instances/updates/delete\",\"Microsoft.DeviceUpdate/accounts/instances/management/read\",\"Microsoft.DeviceUpdate/accounts/instances/management/write\",\"Microsoft.DeviceUpdate/accounts/instances/management/delete\"],\"notDataActions\":[]}],\"createdOn\":\"2020-08-21T23:56:22.3520510Z\",\"updatedOn\":\"2020-08-21T23:56:22.3520510Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/02ca0879-e8e4-47a5-a61e-5c618b76e64a\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"02ca0879-e8e4-47a5-a61e-5c618b76e64a\"},{\"properties\":{\"roleName\":\"Device + Update Content Administrator\",\"type\":\"BuiltInRole\",\"description\":\"Gives + you full access to content operations\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.Insights/alertRules/*\"],\"notActions\":[],\"dataActions\":[\"Microsoft.DeviceUpdate/accounts/instances/updates/read\",\"Microsoft.DeviceUpdate/accounts/instances/updates/write\",\"Microsoft.DeviceUpdate/accounts/instances/updates/delete\"],\"notDataActions\":[]}],\"createdOn\":\"2020-08-21T23:58:18.4255500Z\",\"updatedOn\":\"2020-08-21T23:58:18.4255500Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/0378884a-3af5-44ab-8323-f5b22f9f3c98\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"0378884a-3af5-44ab-8323-f5b22f9f3c98\"},{\"properties\":{\"roleName\":\"Device + Update Deployments Administrator\",\"type\":\"BuiltInRole\",\"description\":\"Gives + you full access to management operations\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.Insights/alertRules/*\"],\"notActions\":[],\"dataActions\":[\"Microsoft.DeviceUpdate/accounts/instances/management/read\",\"Microsoft.DeviceUpdate/accounts/instances/management/write\",\"Microsoft.DeviceUpdate/accounts/instances/management/delete\"],\"notDataActions\":[]}],\"createdOn\":\"2020-08-21T23:59:52.1001666Z\",\"updatedOn\":\"2020-08-21T23:59:52.1001666Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/e4237640-0e3d-4a46-8fda-70bc94856432\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"e4237640-0e3d-4a46-8fda-70bc94856432\"},{\"properties\":{\"roleName\":\"Device + Update Deployments Reader\",\"type\":\"BuiltInRole\",\"description\":\"Gives + you read access to management operations, but does not allow making changes\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.Insights/alertRules/*\"],\"notActions\":[],\"dataActions\":[\"Microsoft.DeviceUpdate/accounts/instances/management/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-08-22T00:01:34.7053630Z\",\"updatedOn\":\"2020-08-22T00:01:34.7053630Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/49e2f5d2-7741-4835-8efa-19e1fe35e47f\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"49e2f5d2-7741-4835-8efa-19e1fe35e47f\"},{\"properties\":{\"roleName\":\"Device + Update Content Reader\",\"type\":\"BuiltInRole\",\"description\":\"Gives you + read access to content operations, but does not allow making changes\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\",\"Microsoft.Insights/alertRules/*\"],\"notActions\":[],\"dataActions\":[\"Microsoft.DeviceUpdate/accounts/instances/updates/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-08-22T00:02:43.3299181Z\",\"updatedOn\":\"2020-08-22T00:02:43.3299181Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/d1ee9a80-8b14-47f0-bdc2-f4a351625a7b\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"d1ee9a80-8b14-47f0-bdc2-f4a351625a7b\"},{\"properties\":{\"roleName\":\"Cognitive + Services Metrics Advisor Administrator\",\"type\":\"BuiltInRole\",\"description\":\"Full + access to the project, including the system level configuration.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.CognitiveServices/*/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.CognitiveServices/accounts/MetricsAdvisor/*\"],\"notDataActions\":[]}],\"createdOn\":\"2020-09-10T07:46:47.5804491Z\",\"updatedOn\":\"2020-09-16T12:07:16.3975746Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/cb43c632-a144-4ec5-977c-e80c4affc34a\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"cb43c632-a144-4ec5-977c-e80c4affc34a\"},{\"properties\":{\"roleName\":\"Cognitive + Services Metrics Advisor User\",\"type\":\"BuiltInRole\",\"description\":\"Access + to the project.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.CognitiveServices/*/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.CognitiveServices/accounts/MetricsAdvisor/*\"],\"notDataActions\":[\"Microsoft.CognitiveServices/accounts/MetricsAdvisor/stats/*\"]}],\"createdOn\":\"2020-09-10T07:47:59.6195639Z\",\"updatedOn\":\"2020-09-16T12:06:29.1731967Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3b20f47b-3825-43cb-8114-4bd2201156a8\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"3b20f47b-3825-43cb-8114-4bd2201156a8\"},{\"properties\":{\"roleName\":\"Schema + Registry Reader (Preview)\",\"type\":\"BuiltInRole\",\"description\":\"Read + and list Schema Registry groups and schemas.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.EventHub/namespaces/schemagroups/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.EventHub/namespaces/schemas/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-09-13T06:31:38.0272740Z\",\"updatedOn\":\"2020-09-13T06:31:38.0272740Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2c56ea50-c6b3-40a6-83c0-9d98858bc7d2\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"2c56ea50-c6b3-40a6-83c0-9d98858bc7d2\"},{\"properties\":{\"roleName\":\"Schema + Registry Contributor (Preview)\",\"type\":\"BuiltInRole\",\"description\":\"Read, + write, and delete Schema Registry groups and schemas.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.EventHub/namespaces/schemagroups/*\"],\"notActions\":[],\"dataActions\":[\"Microsoft.EventHub/namespaces/schemas/*\"],\"notDataActions\":[]}],\"createdOn\":\"2020-09-13T06:48:26.6032931Z\",\"updatedOn\":\"2020-09-13T06:48:26.6032931Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/5dffeca3-4936-4216-b2bc-10343a5abb25\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"5dffeca3-4936-4216-b2bc-10343a5abb25\"},{\"properties\":{\"roleName\":\"AgFood + Platform Service Reader\",\"type\":\"BuiltInRole\",\"description\":\"Provides + read access to AgFood Platform Service\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.AgFoodPlatform/*/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-09-14T10:21:08.9138820Z\",\"updatedOn\":\"2020-09-14T10:21:08.9138820Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/7ec7ccdc-f61e-41fe-9aaf-980df0a44eba\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"7ec7ccdc-f61e-41fe-9aaf-980df0a44eba\"},{\"properties\":{\"roleName\":\"AgFood + Platform Service Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Provides + contribute access to AgFood Platform Service\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.AgFoodPlatform/*/action\",\"Microsoft.AgFoodPlatform/*/read\",\"Microsoft.AgFoodPlatform/*/write\"],\"notDataActions\":[\"Microsoft.AgFoodPlatform/farmers/write\"]}],\"createdOn\":\"2020-09-14T10:21:09.7239169Z\",\"updatedOn\":\"2020-10-27T09:45:30.5740183Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8508508a-4469-4e45-963b-2518ee0bb728\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"8508508a-4469-4e45-963b-2518ee0bb728\"},{\"properties\":{\"roleName\":\"AgFood + Platform Service Admin\",\"type\":\"BuiltInRole\",\"description\":\"Provides + admin access to AgFood Platform Service\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.AgFoodPlatform/*\"],\"notDataActions\":[]}],\"createdOn\":\"2020-09-14T10:21:09.8039209Z\",\"updatedOn\":\"2020-09-14T10:21:09.8039209Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/f8da80de-1ff9-4747-ad80-a19b7f6079e3\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"f8da80de-1ff9-4747-ad80-a19b7f6079e3\"},{\"properties\":{\"roleName\":\"Managed + HSM contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage + managed HSM pools, but not access to them.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.KeyVault/managedHSMs/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-09-16T21:47:01.1291104Z\",\"updatedOn\":\"2020-09-16T21:47:01.1291104Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/18500a29-7fe2-46b2-a342-b16a415e101d\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"18500a29-7fe2-46b2-a342-b16a415e101d\"},{\"properties\":{\"roleName\":\"Security + Detonation Chamber Submitter\",\"type\":\"BuiltInRole\",\"description\":\"Allowed + to create submissions to Security Detonation Chamber\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.SecurityDetonation/chambers/submissions/delete\",\"Microsoft.SecurityDetonation/chambers/submissions/write\",\"Microsoft.SecurityDetonation/chambers/submissions/read\",\"Microsoft.SecurityDetonation/chambers/submissions/files/read\",\"Microsoft.SecurityDetonation/chambers/submissions/accesskeyview/read\",\"Microsoft.SecurityDetonation/chambers/platforms/metadata/read\",\"Microsoft.SecurityDetonation/chambers/workflows/metadata/read\",\"Microsoft.SecurityDetonation/chambers/toolsets/metadata/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-10-01T08:55:21.3980274Z\",\"updatedOn\":\"2021-05-23T13:37:59.3020751Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/0b555d9b-b4a7-4f43-b330-627f0e5be8f0\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"0b555d9b-b4a7-4f43-b330-627f0e5be8f0\"},{\"properties\":{\"roleName\":\"SignalR + Service Reader (Preview)\",\"type\":\"BuiltInRole\",\"description\":\"Read-only + access to Azure SignalR Service REST APIs\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.SignalRService/SignalR/group/read\",\"Microsoft.SignalRService/SignalR/clientConnection/read\",\"Microsoft.SignalRService/SignalR/user/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-10-13T09:19:05.6463616Z\",\"updatedOn\":\"2020-10-23T08:25:22.8928130Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/ddde6b66-c0df-4114-a159-3618637b3035\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"ddde6b66-c0df-4114-a159-3618637b3035\"},{\"properties\":{\"roleName\":\"SignalR + Service Owner (Preview)\",\"type\":\"BuiltInRole\",\"description\":\"Full + access to Azure SignalR Service REST APIs\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.SignalRService/SignalR/auth/accessKey/action\",\"Microsoft.SignalRService/SignalR/auth/clientToken/action\",\"Microsoft.SignalRService/SignalR/hub/send/action\",\"Microsoft.SignalRService/SignalR/group/send/action\",\"Microsoft.SignalRService/SignalR/group/read\",\"Microsoft.SignalRService/SignalR/group/write\",\"Microsoft.SignalRService/SignalR/clientConnection/send/action\",\"Microsoft.SignalRService/SignalR/clientConnection/read\",\"Microsoft.SignalRService/SignalR/clientConnection/write\",\"Microsoft.SignalRService/SignalR/user/send/action\",\"Microsoft.SignalRService/SignalR/user/read\",\"Microsoft.SignalRService/SignalR/user/write\"],\"notDataActions\":[]}],\"createdOn\":\"2020-10-13T09:20:32.1501410Z\",\"updatedOn\":\"2021-03-24T09:39:35.1558342Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/7e4f1700-ea5a-4f59-8f37-079cfe29dce3\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"7e4f1700-ea5a-4f59-8f37-079cfe29dce3\"},{\"properties\":{\"roleName\":\"Reservation + Purchaser\",\"type\":\"BuiltInRole\",\"description\":\"Lets you purchase reservations\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Resources/subscriptions/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Capacity/register/action\",\"Microsoft.Compute/register/action\",\"Microsoft.SQL/register/action\",\"Microsoft.Consumption/register/action\",\"Microsoft.Capacity/catalogs/read\",\"Microsoft.Authorization/roleAssignments/read\",\"Microsoft.Consumption/reservationRecommendations/read\",\"Microsoft.Support/supporttickets/write\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-10-23T20:22:48.9217751Z\",\"updatedOn\":\"2020-10-23T20:22:48.9217751Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/f7b75c60-3036-4b75-91c3-6b41c27c1689\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"f7b75c60-3036-4b75-91c3-6b41c27c1689\"},{\"properties\":{\"roleName\":\"AzureML + Metrics Writer (preview)\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you write metrics to AzureML workspace\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.MachineLearningServices/workspaces/metrics/*/write\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-10-27T16:55:19.5664950Z\",\"updatedOn\":\"2020-10-28T19:17:09.2941184Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/635dd51f-9968-44d3-b7fb-6d9a6bd613ae\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"635dd51f-9968-44d3-b7fb-6d9a6bd613ae\"},{\"properties\":{\"roleName\":\"Storage + Account Backup Contributor Role\",\"type\":\"BuiltInRole\",\"description\":\"Storage + Account Backup Contributors are allowed to perform backup and restore of Storage + Account.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Authorization/locks/read\",\"Microsoft.Authorization/locks/write\",\"Microsoft.Authorization/locks/delete\",\"Microsoft.Features/features/read\",\"Microsoft.Features/providers/features/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Storage/operations/read\",\"Microsoft.Storage/storageAccounts/blobServices/containers/read\",\"Microsoft.Storage/storageAccounts/blobServices/read\",\"Microsoft.Storage/storageAccounts/blobServices/write\",\"Microsoft.Storage/storageAccounts/read\",\"Microsoft.Storage/storageAccounts/restoreBlobRanges/action\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-11-02T23:32:50.4203469Z\",\"updatedOn\":\"2020-11-18T22:53:07.0632395Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/e5e2a7ff-d759-4cd2-bb51-3152d37e2eb1\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"e5e2a7ff-d759-4cd2-bb51-3152d37e2eb1\"},{\"properties\":{\"roleName\":\"Experimentation + Metric Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Allows for + creation, writes and reads to the metric set via the metrics service APIs.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Experimentation/experimentWorkspaces/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Experimentation/experimentWorkspaces/experimentationGroups/read\",\"Microsoft.Experimentation/experimentWorkspaces/experimentationGroups/metricwrite/action\",\"Microsoft.Experimentation/experimentWorkspaces/metricwrite/action\",\"Microsoft.Experimentation/experimentWorkspaces/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-11-10T20:07:53.7535885Z\",\"updatedOn\":\"2021-03-05T16:14:20.5696005Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/6188b7c9-7d01-4f99-a59f-c88b630326c0\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"6188b7c9-7d01-4f99-a59f-c88b630326c0\"},{\"properties\":{\"roleName\":\"Project + Babylon Data Curator\",\"type\":\"BuiltInRole\",\"description\":\"The Microsoft.ProjectBabylon + data curator can create, read, modify and delete catalog data objects and + establish relationships between objects. This role is in preview and subject + to change.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ProjectBabylon/accounts/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.ProjectBabylon/accounts/data/read\",\"Microsoft.ProjectBabylon/accounts/data/write\"],\"notDataActions\":[]}],\"createdOn\":\"2020-11-14T02:31:33.7988825Z\",\"updatedOn\":\"2020-11-20T21:21:21.9658575Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9ef4ef9c-a049-46b0-82ab-dd8ac094c889\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"9ef4ef9c-a049-46b0-82ab-dd8ac094c889\"},{\"properties\":{\"roleName\":\"Project + Babylon Data Reader\",\"type\":\"BuiltInRole\",\"description\":\"The Microsoft.ProjectBabylon + data reader can read catalog data objects. This role is in preview and subject + to change.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ProjectBabylon/accounts/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.ProjectBabylon/accounts/data/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-11-14T02:33:13.5342351Z\",\"updatedOn\":\"2020-11-20T21:21:51.9362426Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/c8d896ba-346d-4f50-bc1d-7d1c84130446\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"c8d896ba-346d-4f50-bc1d-7d1c84130446\"},{\"properties\":{\"roleName\":\"Project + Babylon Data Source Administrator\",\"type\":\"BuiltInRole\",\"description\":\"The + Microsoft.ProjectBabylon data source administrator can manage data sources + and data scans. This role is in preview and subject to change.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.ProjectBabylon/accounts/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.ProjectBabylon/accounts/scan/read\",\"Microsoft.ProjectBabylon/accounts/scan/write\"],\"notDataActions\":[]}],\"createdOn\":\"2020-11-14T02:34:01.8401954Z\",\"updatedOn\":\"2020-11-20T21:22:15.6138058Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/05b7651b-dc44-475e-b74d-df3db49fae0f\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"05b7651b-dc44-475e-b74d-df3db49fae0f\"},{\"properties\":{\"roleName\":\"Purview + Data Curator\",\"type\":\"BuiltInRole\",\"description\":\"The Microsoft.Purview + data curator can create, read, modify and delete catalog data objects and + establish relationships between objects. This role is in preview and subject + to change.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Purview/accounts/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Purview/accounts/data/read\",\"Microsoft.Purview/accounts/data/write\"],\"notDataActions\":[]}],\"createdOn\":\"2020-11-14T02:37:15.0123345Z\",\"updatedOn\":\"2020-11-20T21:24:12.8131677Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8a3c2885-9b38-4fd2-9d99-91af537c1347\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"8a3c2885-9b38-4fd2-9d99-91af537c1347\"},{\"properties\":{\"roleName\":\"Purview + Data Reader\",\"type\":\"BuiltInRole\",\"description\":\"The Microsoft.Purview + data reader can read catalog data objects. This role is in preview and subject + to change.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Purview/accounts/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Purview/accounts/data/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-11-14T02:39:22.2344740Z\",\"updatedOn\":\"2020-11-20T21:24:29.5157346Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/ff100721-1b9d-43d8-af52-42b69c1272db\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"ff100721-1b9d-43d8-af52-42b69c1272db\"},{\"properties\":{\"roleName\":\"Purview + Data Source Administrator\",\"type\":\"BuiltInRole\",\"description\":\"The + Microsoft.Purview data source administrator can manage data sources and data + scans. This role is in preview and subject to change.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Purview/accounts/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Purview/accounts/scan/read\",\"Microsoft.Purview/accounts/scan/write\"],\"notDataActions\":[]}],\"createdOn\":\"2020-11-14T02:40:05.0975648Z\",\"updatedOn\":\"2020-11-20T21:24:43.5940624Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/200bba9e-f0c8-430f-892b-6f0794863803\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"200bba9e-f0c8-430f-892b-6f0794863803\"},{\"properties\":{\"roleName\":\"Application + Group Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Contributor + of the Application Group.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.DesktopVirtualization/applicationgroups/*\",\"Microsoft.DesktopVirtualization/hostpools/read\",\"Microsoft.DesktopVirtualization/hostpools/sessionhosts/read\",\"Microsoft.DesktopVirtualization/workspaces/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-12-03T23:26:00.2784962Z\",\"updatedOn\":\"2020-12-04T23:46:35.0341772Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/ca6382a4-1721-4bcf-a114-ff0c70227b6b\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"ca6382a4-1721-4bcf-a114-ff0c70227b6b\"},{\"properties\":{\"roleName\":\"Desktop + Virtualization Reader\",\"type\":\"BuiltInRole\",\"description\":\"Reader + of Desktop Virtualization.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.DesktopVirtualization/*/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/deployments/read\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-12-11T21:36:19.0140629Z\",\"updatedOn\":\"2020-12-11T21:36:19.0140629Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/49a72310-ab8d-41df-bbb0-79b649203868\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"49a72310-ab8d-41df-bbb0-79b649203868\"},{\"properties\":{\"roleName\":\"Desktop + Virtualization Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Contributor + of Desktop Virtualization.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.DesktopVirtualization/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-12-11T21:37:16.2910337Z\",\"updatedOn\":\"2020-12-11T21:37:16.2910337Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/082f0a83-3be5-4ba1-904c-961cca79b387\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"082f0a83-3be5-4ba1-904c-961cca79b387\"},{\"properties\":{\"roleName\":\"Desktop + Virtualization Workspace Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Contributor + of the Desktop Virtualization Workspace.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.DesktopVirtualization/workspaces/*\",\"Microsoft.DesktopVirtualization/applicationgroups/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-12-11T21:38:29.6089216Z\",\"updatedOn\":\"2020-12-11T21:38:29.6089216Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/21efdde3-836f-432b-bf3d-3e8e734d4b2b\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"21efdde3-836f-432b-bf3d-3e8e734d4b2b\"},{\"properties\":{\"roleName\":\"Desktop + Virtualization User Session Operator\",\"type\":\"BuiltInRole\",\"description\":\"Operator + of the Desktop Virtualization Uesr Session.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.DesktopVirtualization/hostpools/read\",\"Microsoft.DesktopVirtualization/hostpools/sessionhosts/read\",\"Microsoft.DesktopVirtualization/hostpools/sessionhosts/usersessions/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-12-11T21:39:16.9100273Z\",\"updatedOn\":\"2020-12-11T21:39:16.9100273Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/ea4bfff8-7fb4-485a-aadd-d4129a0ffaa6\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"ea4bfff8-7fb4-485a-aadd-d4129a0ffaa6\"},{\"properties\":{\"roleName\":\"Desktop + Virtualization Session Host Operator\",\"type\":\"BuiltInRole\",\"description\":\"Operator + of the Desktop Virtualization Session Host.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.DesktopVirtualization/hostpools/read\",\"Microsoft.DesktopVirtualization/hostpools/sessionhosts/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-12-11T21:39:53.2569741Z\",\"updatedOn\":\"2020-12-11T21:39:53.2569741Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2ad6aaab-ead9-4eaa-8ac5-da422f562408\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"2ad6aaab-ead9-4eaa-8ac5-da422f562408\"},{\"properties\":{\"roleName\":\"Desktop + Virtualization Host Pool Reader\",\"type\":\"BuiltInRole\",\"description\":\"Reader + of the Desktop Virtualization Host Pool.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.DesktopVirtualization/hostpools/*/read\",\"Microsoft.DesktopVirtualization/hostpools/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/deployments/read\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-12-11T21:40:33.1430834Z\",\"updatedOn\":\"2020-12-11T21:40:33.1430834Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/ceadfde2-b300-400a-ab7b-6143895aa822\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"ceadfde2-b300-400a-ab7b-6143895aa822\"},{\"properties\":{\"roleName\":\"Desktop + Virtualization Host Pool Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Contributor + of the Desktop Virtualization Host Pool.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.DesktopVirtualization/hostpools/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-12-11T21:40:57.2976187Z\",\"updatedOn\":\"2020-12-11T21:40:57.2976187Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/e307426c-f9b6-4e81-87de-d99efb3c32bc\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"e307426c-f9b6-4e81-87de-d99efb3c32bc\"},{\"properties\":{\"roleName\":\"Desktop + Virtualization Application Group Reader\",\"type\":\"BuiltInRole\",\"description\":\"Reader + of the Desktop Virtualization Application Group.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.DesktopVirtualization/applicationgroups/*/read\",\"Microsoft.DesktopVirtualization/applicationgroups/read\",\"Microsoft.DesktopVirtualization/hostpools/read\",\"Microsoft.DesktopVirtualization/hostpools/sessionhosts/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/deployments/read\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-12-11T21:41:18.0287398Z\",\"updatedOn\":\"2020-12-11T21:41:18.0287398Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/aebf23d0-b568-4e86-b8f9-fe83a2c6ab55\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"aebf23d0-b568-4e86-b8f9-fe83a2c6ab55\"},{\"properties\":{\"roleName\":\"Desktop + Virtualization Application Group Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Contributor + of the Desktop Virtualization Application Group.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.DesktopVirtualization/applicationgroups/*\",\"Microsoft.DesktopVirtualization/hostpools/read\",\"Microsoft.DesktopVirtualization/hostpools/sessionhosts/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-12-11T21:41:38.6205531Z\",\"updatedOn\":\"2020-12-11T21:41:38.6205531Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/86240b0e-9422-4c43-887b-b61143f32ba8\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"86240b0e-9422-4c43-887b-b61143f32ba8\"},{\"properties\":{\"roleName\":\"Desktop + Virtualization Workspace Reader\",\"type\":\"BuiltInRole\",\"description\":\"Reader + of the Desktop Virtualization Workspace.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.DesktopVirtualization/workspaces/read\",\"Microsoft.DesktopVirtualization/applicationgroups/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Resources/deployments/read\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-12-11T21:41:58.1892707Z\",\"updatedOn\":\"2020-12-11T21:41:58.1892707Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/0fa44ee9-7a7d-466b-9bb2-2bf446b1204d\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"0fa44ee9-7a7d-466b-9bb2-2bf446b1204d\"},{\"properties\":{\"roleName\":\"Disk + Backup Reader\",\"type\":\"BuiltInRole\",\"description\":\"Provides permission + to backup vault to perform disk backup.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Compute/disks/read\",\"Microsoft.Compute/disks/beginGetAccess/action\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-12-15T07:39:03.8394514Z\",\"updatedOn\":\"2020-12-18T05:00:23.3015246Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/3e5e47e6-65f7-47ef-90b5-e5dd4d455f24\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"3e5e47e6-65f7-47ef-90b5-e5dd4d455f24\"},{\"properties\":{\"roleName\":\"Autonomous + Development Platform Data Contributor (Preview)\",\"type\":\"BuiltInRole\",\"description\":\"Grants + permissions to upload and manage new Autonomous Development Platform measurements.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.AutonomousDevelopmentPlatform/accounts/*/read\",\"Microsoft.Authorization/*/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.AutonomousDevelopmentPlatform/accounts/dataPools/discoveries/*\",\"Microsoft.AutonomousDevelopmentPlatform/accounts/dataPools/uploads/*\",\"Microsoft.AutonomousDevelopmentPlatform/accounts/dataPools/measurements/states/new/*\",\"Microsoft.AutonomousDevelopmentPlatform/accounts/measurementCollections/*\"],\"notDataActions\":[\"Microsoft.AutonomousDevelopmentPlatform/accounts/dataPools/measurements/states/new/changeState/action\"]}],\"createdOn\":\"2020-12-15T11:30:01.7459379Z\",\"updatedOn\":\"2021-02-08T20:04:29.9188777Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b8b15564-4fa6-4a59-ab12-03e1d9594795\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b8b15564-4fa6-4a59-ab12-03e1d9594795\"},{\"properties\":{\"roleName\":\"Autonomous + Development Platform Data Reader (Preview)\",\"type\":\"BuiltInRole\",\"description\":\"Grants + read access to Autonomous Development Platform data.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.AutonomousDevelopmentPlatform/accounts/*/read\",\"Microsoft.Authorization/*/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.AutonomousDevelopmentPlatform/accounts/*/read\"],\"notDataActions\":[]}],\"createdOn\":\"2020-12-15T12:11:31.9843256Z\",\"updatedOn\":\"2021-02-08T16:16:53.0489887Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/d63b75f7-47ea-4f27-92ac-e0d173aaf093\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"d63b75f7-47ea-4f27-92ac-e0d173aaf093\"},{\"properties\":{\"roleName\":\"Autonomous + Development Platform Data Owner (Preview)\",\"type\":\"BuiltInRole\",\"description\":\"Grants + full access to Autonomous Development Platform data.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.AutonomousDevelopmentPlatform/accounts/*/read\",\"Microsoft.Authorization/*/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.AutonomousDevelopmentPlatform/accounts/*\"],\"notDataActions\":[]}],\"createdOn\":\"2020-12-15T12:13:59.9702378Z\",\"updatedOn\":\"2021-02-08T16:12:28.8035230Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/27f8b550-c507-4db9-86f2-f4b8e816d59d\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"27f8b550-c507-4db9-86f2-f4b8e816d59d\"},{\"properties\":{\"roleName\":\"Disk + Restore Operator\",\"type\":\"BuiltInRole\",\"description\":\"Provides permission + to backup vault to perform disk restore.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Compute/disks/write\",\"Microsoft.Compute/disks/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-12-15T12:18:31.8481619Z\",\"updatedOn\":\"2020-12-18T05:00:53.9562743Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b50d9833-a0cb-478e-945f-707fcc997c13\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b50d9833-a0cb-478e-945f-707fcc997c13\"},{\"properties\":{\"roleName\":\"Disk + Snapshot Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Provides + permission to backup vault to manage disk snapshots.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Compute/snapshots/delete\",\"Microsoft.Compute/snapshots/write\",\"Microsoft.Compute/snapshots/read\",\"Microsoft.Compute/snapshots/beginGetAccess/action\",\"Microsoft.Compute/snapshots/endGetAccess/action\",\"Microsoft.Compute/disks/beginGetAccess/action\",\"Microsoft.Storage/storageAccounts/listkeys/action\",\"Microsoft.Storage/storageAccounts/write\",\"Microsoft.Storage/storageAccounts/read\",\"Microsoft.Storage/storageAccounts/delete\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2020-12-15T12:18:51.4471411Z\",\"updatedOn\":\"2021-01-06T04:00:07.5681241Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/7efff54f-a5b4-42b5-a1c5-5411624893ce\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"7efff54f-a5b4-42b5-a1c5-5411624893ce\"},{\"properties\":{\"roleName\":\"Microsoft.Kubernetes + connected cluster role\",\"type\":\"BuiltInRole\",\"description\":\"Microsoft.Kubernetes + connected cluster role.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Kubernetes/connectedClusters/read\",\"Microsoft.Kubernetes/connectedClusters/write\",\"Microsoft.Kubernetes/connectedClusters/delete\",\"Microsoft.Kubernetes/registeredSubscriptions/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2021-01-07T23:57:10.9923232Z\",\"updatedOn\":\"2021-01-07T23:57:10.9923232Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/5548b2cf-c94c-4228-90ba-30851930a12f\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"5548b2cf-c94c-4228-90ba-30851930a12f\"},{\"properties\":{\"roleName\":\"Security + Detonation Chamber Submission Manager\",\"type\":\"BuiltInRole\",\"description\":\"Allowed + to create and manage submissions to Security Detonation Chamber\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.SecurityDetonation/chambers/submissions/delete\",\"Microsoft.SecurityDetonation/chambers/submissions/write\",\"Microsoft.SecurityDetonation/chambers/submissions/read\",\"Microsoft.SecurityDetonation/chambers/submissions/files/read\",\"Microsoft.SecurityDetonation/chambers/submissions/accesskeyview/read\",\"Microsoft.SecurityDetonation/chambers/submissions/adminview/read\",\"Microsoft.SecurityDetonation/chambers/submissions/analystview/read\",\"Microsoft.SecurityDetonation/chambers/submissions/publicview/read\",\"Microsoft.SecurityDetonation/chambers/platforms/metadata/read\",\"Microsoft.SecurityDetonation/chambers/workflows/metadata/read\",\"Microsoft.SecurityDetonation/chambers/toolsets/metadata/read\"],\"notDataActions\":[]}],\"createdOn\":\"2021-01-18T09:35:36.5739297Z\",\"updatedOn\":\"2021-05-23T13:38:47.4627306Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/a37b566d-3efa-4beb-a2f2-698963fa42ce\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"a37b566d-3efa-4beb-a2f2-698963fa42ce\"},{\"properties\":{\"roleName\":\"Security + Detonation Chamber Publisher\",\"type\":\"BuiltInRole\",\"description\":\"Allowed + to publish and modify platforms, workflows and toolsets to Security Detonation + Chamber\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.SecurityDetonation/chambers/platforms/read\",\"Microsoft.SecurityDetonation/chambers/platforms/write\",\"Microsoft.SecurityDetonation/chambers/platforms/delete\",\"Microsoft.SecurityDetonation/chambers/platforms/metadata/read\",\"Microsoft.SecurityDetonation/chambers/workflows/read\",\"Microsoft.SecurityDetonation/chambers/workflows/write\",\"Microsoft.SecurityDetonation/chambers/workflows/delete\",\"Microsoft.SecurityDetonation/chambers/workflows/metadata/read\",\"Microsoft.SecurityDetonation/chambers/toolsets/read\",\"Microsoft.SecurityDetonation/chambers/toolsets/write\",\"Microsoft.SecurityDetonation/chambers/toolsets/delete\",\"Microsoft.SecurityDetonation/chambers/toolsets/metadata/read\",\"Microsoft.SecurityDetonation/chambers/publishRequests/read\",\"Microsoft.SecurityDetonation/chambers/publishRequests/cancel/action\"],\"notDataActions\":[]}],\"createdOn\":\"2021-01-18T11:43:14.0858184Z\",\"updatedOn\":\"2021-03-07T13:06:15.7172517Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/352470b3-6a9c-4686-b503-35deb827e500\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"352470b3-6a9c-4686-b503-35deb827e500\"},{\"properties\":{\"roleName\":\"Collaborative + Runtime Operator\",\"type\":\"BuiltInRole\",\"description\":\"Can manage resources + created by AICS at runtime\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.IndustryDataLifecycle/derivedModels/*\",\"Microsoft.IndustryDataLifecycle/pipelineSets/*\",\"Microsoft.IndustryDataLifecycle/modelMappings/*\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2021-01-19T10:00:27.3464971Z\",\"updatedOn\":\"2021-04-26T06:26:59.0344457Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/7a6f0e70-c033-4fb1-828c-08514e5f4102\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"7a6f0e70-c033-4fb1-828c-08514e5f4102\"},{\"properties\":{\"roleName\":\"CosmosRestoreOperator\",\"type\":\"BuiltInRole\",\"description\":\"Can + perform restore action for Cosmos DB database account with continuous backup + mode\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restore/action\",\"Microsoft.DocumentDB/locations/restorableDatabaseAccounts/*/read\",\"Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2021-01-21T19:51:35.3884884Z\",\"updatedOn\":\"2021-01-23T01:40:20.9862312Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/5432c526-bc82-444a-b7ba-57c5b0b5b34f\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"5432c526-bc82-444a-b7ba-57c5b0b5b34f\"},{\"properties\":{\"roleName\":\"FHIR + Data Converter\",\"type\":\"BuiltInRole\",\"description\":\"Role allows user + or principal to convert data from legacy format to FHIR\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.HealthcareApis/services/fhir/resources/convertData/action\"],\"notDataActions\":[]}],\"createdOn\":\"2021-01-22T19:39:01.1601069Z\",\"updatedOn\":\"2021-01-22T19:39:01.1601069Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"a1705bd2-3a8f-45a5-8683-466fcfd5cc24\"},{\"properties\":{\"roleName\":\"Azure + Sentinel Automation Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Azure + Sentinel Automation Contributor\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Logic/workflows/triggers/read\",\"Microsoft.Logic/workflows/triggers/listCallbackUrl/action\",\"Microsoft.Logic/workflows/runs/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2021-01-24T08:50:52.0382991Z\",\"updatedOn\":\"2021-01-25T19:48:16.7893833Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/f4c81013-99ee-4d62-a7ee-b3f1f648599a\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"f4c81013-99ee-4d62-a7ee-b3f1f648599a\"},{\"properties\":{\"roleName\":\"Quota + Request Operator\",\"type\":\"BuiltInRole\",\"description\":\"Read and create + quota requests, get quota request status, and create support tickets.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Capacity/resourceProviders/locations/serviceLimits/read\",\"Microsoft.Capacity/resourceProviders/locations/serviceLimits/write\",\"Microsoft.Capacity/resourceProviders/locations/serviceLimitsRequests/read\",\"Microsoft.Capacity/register/action\",\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2021-02-03T00:06:35.8404575Z\",\"updatedOn\":\"2021-03-22T21:53:11.9852943Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/0e5f05e5-9ab9-446b-b98d-1e2157c94125\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"0e5f05e5-9ab9-446b-b98d-1e2157c94125\"},{\"properties\":{\"roleName\":\"EventGrid + Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage EventGrid + operations.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.EventGrid/*\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.Support/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2021-02-08T18:46:18.8999557Z\",\"updatedOn\":\"2021-02-11T00:02:16.0328078Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/1e241071-0855-49ea-94dc-649edcd759de\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"1e241071-0855-49ea-94dc-649edcd759de\"},{\"properties\":{\"roleName\":\"Security + Detonation Chamber Reader\",\"type\":\"BuiltInRole\",\"description\":\"Allowed + to query submission info and files from Security Detonation Chamber\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.SecurityDetonation/chambers/submissions/read\",\"Microsoft.SecurityDetonation/chambers/submissions/files/read\"],\"notDataActions\":[]}],\"createdOn\":\"2021-03-01T14:06:46.2814905Z\",\"updatedOn\":\"2021-03-01T14:09:25.0080904Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/28241645-39f8-410b-ad48-87863e2951d5\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"28241645-39f8-410b-ad48-87863e2951d5\"},{\"properties\":{\"roleName\":\"Object + Anchors Account Reader\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + read ingestion jobs for an object anchors account.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.MixedReality/ObjectAnchorsAccounts/ingest/read\"],\"notDataActions\":[]}],\"createdOn\":\"2021-03-02T01:20:47.0279813Z\",\"updatedOn\":\"2021-03-02T01:34:08.6743401Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4a167cdf-cb95-4554-9203-2347fe489bd9\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"4a167cdf-cb95-4554-9203-2347fe489bd9\"},{\"properties\":{\"roleName\":\"Object + Anchors Account Owner\",\"type\":\"BuiltInRole\",\"description\":\"Provides + user with ingestion capabilities for an object anchors account.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.MixedReality/ObjectAnchorsAccounts/ingest/action\",\"Microsoft.MixedReality/ObjectAnchorsAccounts/ingest/read\"],\"notDataActions\":[]}],\"createdOn\":\"2021-03-02T01:42:02.0014737Z\",\"updatedOn\":\"2021-03-02T01:45:23.2472961Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/ca0835dd-bacc-42dd-8ed2-ed5e7230d15b\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"ca0835dd-bacc-42dd-8ed2-ed5e7230d15b\"},{\"properties\":{\"roleName\":\"WorkloadBuilder + Migration Agent Role\",\"type\":\"BuiltInRole\",\"description\":\"WorkloadBuilder + Migration Agent Role.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.WorkloadBuilder/migrationAgents/Read\",\"Microsoft.WorkloadBuilder/migrationAgents/Write\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2021-03-11T17:07:20.0828003Z\",\"updatedOn\":\"2021-03-11T17:07:20.0828003Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/d17ce0a2-0697-43bc-aac5-9113337ab61c\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"d17ce0a2-0697-43bc-aac5-9113337ab61c\"},{\"properties\":{\"roleName\":\"Web + PubSub Service Owner (Preview)\",\"type\":\"BuiltInRole\",\"description\":\"Full + access to Azure Web PubSub Service REST APIs\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.SignalRService/WebPubSub/clientConnection/read\",\"Microsoft.SignalRService/WebPubSub/clientConnection/send/action\",\"Microsoft.SignalRService/WebPubSub/clientConnection/write\",\"Microsoft.SignalRService/WebPubSub/group/read\",\"Microsoft.SignalRService/WebPubSub/group/send/action\",\"Microsoft.SignalRService/WebPubSub/group/write\",\"Microsoft.SignalRService/WebPubSub/hub/send/action\",\"Microsoft.SignalRService/WebPubSub/user/read\",\"Microsoft.SignalRService/WebPubSub/user/send/action\"],\"notDataActions\":[]}],\"createdOn\":\"2021-03-24T09:10:11.8335180Z\",\"updatedOn\":\"2021-03-24T09:28:41.8434072Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/12cf5a90-567b-43ae-8102-96cf46c7d9b4\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"12cf5a90-567b-43ae-8102-96cf46c7d9b4\"},{\"properties\":{\"roleName\":\"Web + PubSub Service Reader (Preview)\",\"type\":\"BuiltInRole\",\"description\":\"Read-only + access to Azure Web PubSub Service REST APIs\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.SignalRService/WebPubSub/clientConnection/read\",\"Microsoft.SignalRService/WebPubSub/group/read\",\"Microsoft.SignalRService/WebPubSub/user/read\"],\"notDataActions\":[]}],\"createdOn\":\"2021-03-24T09:11:12.6235436Z\",\"updatedOn\":\"2021-03-24T09:30:51.2337584Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/bfb1c7d2-fb1a-466b-b2ba-aee63b92deaf\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"bfb1c7d2-fb1a-466b-b2ba-aee63b92deaf\"},{\"properties\":{\"roleName\":\"Azure + Spring Cloud Data Reader\",\"type\":\"BuiltInRole\",\"description\":\"Allow + read access to Azure Spring Cloud Data\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.AppPlatform/Spring/*/read\"],\"notDataActions\":[]}],\"createdOn\":\"2021-03-25T11:12:12.6786010Z\",\"updatedOn\":\"2021-03-25T11:15:24.6631615Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b5537268-8956-4941-a8f0-646150406f0c\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b5537268-8956-4941-a8f0-646150406f0c\"},{\"properties\":{\"roleName\":\"Cognitive + Services Speech User\",\"type\":\"BuiltInRole\",\"description\":\"This is + a role that can create, read, change and delete batch transcriptions, do real + time transcriptions and list or get other speech resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.CognitiveServices/accounts/SpeechServices/*/read\",\"Microsoft.CognitiveServices/accounts/SpeechServices/*/transcriptions/write\",\"Microsoft.CognitiveServices/accounts/SpeechServices/*/transcriptions/delete\",\"Microsoft.CognitiveServices/accounts/SpeechServices/*/transcriptions/read\",\"Microsoft.CognitiveServices/accounts/SpeechServices/*/frontend/action\"],\"notDataActions\":[]}],\"createdOn\":\"2021-03-30T11:28:27.4339032Z\",\"updatedOn\":\"2021-03-30T11:28:27.4339032Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/f2dc8367-1007-4938-bd23-fe263f013447\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"f2dc8367-1007-4938-bd23-fe263f013447\"},{\"properties\":{\"roleName\":\"Cognitive + Services Speech Contributor\",\"type\":\"BuiltInRole\",\"description\":\"This + is a role that can read, write and delete all speech resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.CognitiveServices/accounts/SpeechServices/*\"],\"notDataActions\":[]}],\"createdOn\":\"2021-03-30T11:28:49.7826633Z\",\"updatedOn\":\"2021-03-30T11:28:49.7826633Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/0e75ca1e-0464-4b4d-8b93-68208a576181\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"0e75ca1e-0464-4b4d-8b93-68208a576181\"},{\"properties\":{\"roleName\":\"Cognitive + Services Face Recognizer\",\"type\":\"BuiltInRole\",\"description\":\"Lets + you perform detect, verify, identify, group, and find similar operations on + Face API. This role does not allow create or delete operations, which makes + it well suited for endpoints that only need inferencing capabilities, following + 'least privilege' best practices.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.CognitiveServices/accounts/Face/detect/action\",\"Microsoft.CognitiveServices/accounts/Face/verify/action\",\"Microsoft.CognitiveServices/accounts/Face/identify/action\",\"Microsoft.CognitiveServices/accounts/Face/group/action\",\"Microsoft.CognitiveServices/accounts/Face/findsimilars/action\"],\"notDataActions\":[]}],\"createdOn\":\"2021-03-31T01:51:41.3557295Z\",\"updatedOn\":\"2021-03-31T01:51:41.3557295Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9894cab4-e18a-44aa-828b-cb588cd6f2d7\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"9894cab4-e18a-44aa-828b-cb588cd6f2d7\"},{\"properties\":{\"roleName\":\"Media + Services Account Administrator\",\"type\":\"BuiltInRole\",\"description\":\"Create, + read, modify, and delete Media Services accounts; read-only access to other + Media Services resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Insights/metrics/read\",\"Microsoft.Insights/metricDefinitions/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Media/mediaservices/*/read\",\"Microsoft.Media/mediaservices/assets/listStreamingLocators/action\",\"Microsoft.Media/mediaservices/streamingLocators/listPaths/action\",\"Microsoft.Media/mediaservices/write\",\"Microsoft.Media/mediaservices/delete\",\"Microsoft.Media/mediaservices/privateEndpointConnectionsApproval/action\",\"Microsoft.Media/mediaservices/privateEndpointConnections/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2021-04-19T23:20:32.2956636Z\",\"updatedOn\":\"2021-06-11T21:21:11.1352414Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/054126f8-9a2b-4f1c-a9ad-eca461f08466\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"054126f8-9a2b-4f1c-a9ad-eca461f08466\"},{\"properties\":{\"roleName\":\"Media + Services Live Events Administrator\",\"type\":\"BuiltInRole\",\"description\":\"Create, + read, modify, and delete Live Events, Assets, Asset Filters, and Streaming + Locators; read-only access to other Media Services resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Insights/metrics/read\",\"Microsoft.Insights/metricDefinitions/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Media/mediaservices/*/read\",\"Microsoft.Media/mediaservices/assets/*\",\"Microsoft.Media/mediaservices/assets/assetfilters/*\",\"Microsoft.Media/mediaservices/streamingLocators/*\",\"Microsoft.Media/mediaservices/liveEvents/*\"],\"notActions\":[\"Microsoft.Media/mediaservices/assets/getEncryptionKey/action\",\"Microsoft.Media/mediaservices/streamingLocators/listContentKeys/action\"],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2021-04-19T23:21:00.6119555Z\",\"updatedOn\":\"2021-06-11T21:20:30.6783723Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/532bc159-b25e-42c0-969e-a1d439f60d77\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"532bc159-b25e-42c0-969e-a1d439f60d77\"},{\"properties\":{\"roleName\":\"Media + Services Media Operator\",\"type\":\"BuiltInRole\",\"description\":\"Create, + read, modify, and delete Assets, Asset Filters, Streaming Locators, and Jobs; + read-only access to other Media Services resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Insights/metrics/read\",\"Microsoft.Insights/metricDefinitions/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Media/mediaservices/*/read\",\"Microsoft.Media/mediaservices/assets/*\",\"Microsoft.Media/mediaservices/assets/assetfilters/*\",\"Microsoft.Media/mediaservices/streamingLocators/*\",\"Microsoft.Media/mediaservices/transforms/jobs/*\"],\"notActions\":[\"Microsoft.Media/mediaservices/assets/getEncryptionKey/action\",\"Microsoft.Media/mediaservices/streamingLocators/listContentKeys/action\"],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2021-04-19T23:21:23.2236495Z\",\"updatedOn\":\"2021-06-11T21:20:52.6238751Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/e4395492-1534-4db2-bedf-88c14621589c\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"e4395492-1534-4db2-bedf-88c14621589c\"},{\"properties\":{\"roleName\":\"Media + Services Policy Administrator\",\"type\":\"BuiltInRole\",\"description\":\"Create, + read, modify, and delete Account Filters, Streaming Policies, Content Key + Policies, and Transforms; read-only access to other Media Services resources. + Cannot create Jobs, Assets or Streaming resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Insights/metrics/read\",\"Microsoft.Insights/metricDefinitions/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Media/mediaservices/*/read\",\"Microsoft.Media/mediaservices/assets/listStreamingLocators/action\",\"Microsoft.Media/mediaservices/streamingLocators/listPaths/action\",\"Microsoft.Media/mediaservices/accountFilters/*\",\"Microsoft.Media/mediaservices/streamingPolicies/*\",\"Microsoft.Media/mediaservices/contentKeyPolicies/*\",\"Microsoft.Media/mediaservices/transforms/*\"],\"notActions\":[\"Microsoft.Media/mediaservices/contentKeyPolicies/getPolicyPropertiesWithSecrets/action\"],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2021-04-19T23:21:46.9534330Z\",\"updatedOn\":\"2021-06-11T21:20:01.8020972Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/c4bba371-dacd-4a26-b320-7250bca963ae\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"c4bba371-dacd-4a26-b320-7250bca963ae\"},{\"properties\":{\"roleName\":\"Media + Services Streaming Endpoints Administrator\",\"type\":\"BuiltInRole\",\"description\":\"Create, + read, modify, and delete Streaming Endpoints; read-only access to other Media + Services resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.Insights/alertRules/*\",\"Microsoft.Insights/metrics/read\",\"Microsoft.Insights/metricDefinitions/read\",\"Microsoft.Resources/deployments/*\",\"Microsoft.Resources/subscriptions/resourceGroups/read\",\"Microsoft.ResourceHealth/availabilityStatuses/read\",\"Microsoft.Media/mediaservices/*/read\",\"Microsoft.Media/mediaservices/assets/listStreamingLocators/action\",\"Microsoft.Media/mediaservices/streamingLocators/listPaths/action\",\"Microsoft.Media/mediaservices/streamingEndpoints/*\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2021-04-19T23:22:04.4594851Z\",\"updatedOn\":\"2021-06-11T21:18:02.3864536Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/99dba123-b5fe-44d5-874c-ced7199a5804\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"99dba123-b5fe-44d5-874c-ced7199a5804\"},{\"properties\":{\"roleName\":\"Stream + Analytics Query Tester\",\"type\":\"BuiltInRole\",\"description\":\"Lets you + perform query testing without creating a stream analytics job first\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.StreamAnalytics/locations/TestQuery/action\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2021-04-20T17:33:24.5727870Z\",\"updatedOn\":\"2021-04-26T17:08:16.3575666Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/1ec5b3c1-b17e-4e25-8312-2acb3c3c5abf\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"1ec5b3c1-b17e-4e25-8312-2acb3c3c5abf\"},{\"properties\":{\"roleName\":\"AnyBuild + Builder\",\"type\":\"BuiltInRole\",\"description\":\"Basic user role for AnyBuild. + This role allows listing of agent information and execution of remote build + capabilities.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.AnyBuild/clusters/build/write\",\"Microsoft.AnyBuild/clusters/build/read\"],\"notDataActions\":[]}],\"createdOn\":\"2021-04-20T22:07:00.4963853Z\",\"updatedOn\":\"2021-04-20T22:07:00.4963853Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/a2138dac-4907-4679-a376-736901ed8ad8\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"a2138dac-4907-4679-a376-736901ed8ad8\"},{\"properties\":{\"roleName\":\"IoT + Hub Data Reader\",\"type\":\"BuiltInRole\",\"description\":\"Allows for full + read access to IoT Hub data-plane properties\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Devices/IotHubs/*/read\",\"Microsoft.Devices/IotHubs/fileUpload/notifications/action\"],\"notDataActions\":[]}],\"createdOn\":\"2021-04-22T18:03:29.8843192Z\",\"updatedOn\":\"2021-04-29T23:24:12.4930691Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b447c946-2db7-41ec-983d-d8bf3b1c77e3\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b447c946-2db7-41ec-983d-d8bf3b1c77e3\"},{\"properties\":{\"roleName\":\"IoT + Hub Twin Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Allows for + read and write access to all IoT Hub device and module twins.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Devices/IotHubs/twins/*\"],\"notDataActions\":[]}],\"createdOn\":\"2021-04-22T20:36:10.1136903Z\",\"updatedOn\":\"2021-04-29T23:52:03.1511375Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/494bdba2-168f-4f31-a0a1-191d2f7c028c\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"494bdba2-168f-4f31-a0a1-191d2f7c028c\"},{\"properties\":{\"roleName\":\"IoT + Hub Registry Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Allows + for full access to IoT Hub device registry.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Devices/IotHubs/devices/*\"],\"notDataActions\":[]}],\"createdOn\":\"2021-04-22T20:36:47.5532704Z\",\"updatedOn\":\"2021-04-30T00:01:58.8405124Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4ea46cd5-c1b2-4a8e-910b-273211f9ce47\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"4ea46cd5-c1b2-4a8e-910b-273211f9ce47\"},{\"properties\":{\"roleName\":\"IoT + Hub Data Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Allows for + full access to IoT Hub data plane operations.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Devices/IotHubs/*\"],\"notDataActions\":[]}],\"createdOn\":\"2021-04-22T20:37:16.9927761Z\",\"updatedOn\":\"2021-04-29T23:44:42.6824802Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4fc6c259-987e-4a07-842e-c321cc9d413f\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"4fc6c259-987e-4a07-842e-c321cc9d413f\"},{\"properties\":{\"roleName\":\"Test + Base Reader\",\"type\":\"BuiltInRole\",\"description\":\"Let you view and + download packages and test results.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.TestBase/testBaseAccounts/packages/testResults/getDownloadUrl/action\",\"Microsoft.TestBase/testBaseAccounts/packages/testResults/getVideoDownloadUrl/action\",\"Microsoft.TestBase/testBaseAccounts/packages/getDownloadUrl/action\",\"Microsoft.TestBase/*/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2021-05-11T23:41:33.1038367Z\",\"updatedOn\":\"2021-05-11T23:41:33.1038367Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/15e0f5a1-3450-4248-8e25-e2afe88a9e85\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"15e0f5a1-3450-4248-8e25-e2afe88a9e85\"},{\"properties\":{\"roleName\":\"Search + Index Data Reader\",\"type\":\"BuiltInRole\",\"description\":\"Grants read + access to Azure Cognitive Search index data.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Search/searchServices/indexes/documents/read\"],\"notDataActions\":[]}],\"createdOn\":\"2021-06-01T20:26:13.4850461Z\",\"updatedOn\":\"2021-06-02T19:01:52.2721055Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/1407120a-92aa-4202-b7e9-c0e197c71c8f\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"1407120a-92aa-4202-b7e9-c0e197c71c8f\"},{\"properties\":{\"roleName\":\"Search + Index Data Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Grants + full access to Azure Cognitive Search index data.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.Search/searchServices/indexes/documents/*\"],\"notDataActions\":[]}],\"createdOn\":\"2021-06-01T22:15:16.5388472Z\",\"updatedOn\":\"2021-06-02T18:55:58.1815252Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8ebe5a00-799e-43f5-93ac-243d3dce84a7\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"8ebe5a00-799e-43f5-93ac-243d3dce84a7\"},{\"properties\":{\"roleName\":\"Storage + Table Data Reader\",\"type\":\"BuiltInRole\",\"description\":\"Allows for + read access to Azure Storage tables and entities\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Storage/storageAccounts/tableServices/tables/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Storage/storageAccounts/tableServices/tables/entities/read\"],\"notDataActions\":[]}],\"createdOn\":\"2021-06-15T06:40:54.9150717Z\",\"updatedOn\":\"2021-06-15T06:40:54.9150717Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/76199698-9eea-4c19-bc75-cec21354c6b6\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"76199698-9eea-4c19-bc75-cec21354c6b6\"},{\"properties\":{\"roleName\":\"Storage + Table Data Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Allows + for read, write and delete access to Azure Storage tables and entities\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Storage/storageAccounts/tableServices/tables/read\",\"Microsoft.Storage/storageAccounts/tableServices/tables/write\",\"Microsoft.Storage/storageAccounts/tableServices/tables/delete\"],\"notActions\":[],\"dataActions\":[\"Microsoft.Storage/storageAccounts/tableServices/tables/entities/read\",\"Microsoft.Storage/storageAccounts/tableServices/tables/entities/write\",\"Microsoft.Storage/storageAccounts/tableServices/tables/entities/delete\",\"Microsoft.Storage/storageAccounts/tableServices/tables/entities/add/action\",\"Microsoft.Storage/storageAccounts/tableServices/tables/entities/update/action\"],\"notDataActions\":[]}],\"createdOn\":\"2021-06-15T06:51:59.8207610Z\",\"updatedOn\":\"2021-06-15T06:51:59.8207610Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/0a9a7e1f-b9d0-4cc4-a60d-0319b160aaa3\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"0a9a7e1f-b9d0-4cc4-a60d-0319b160aaa3\"},{\"properties\":{\"roleName\":\"DICOM + Data Reader\",\"type\":\"BuiltInRole\",\"description\":\"Read and search DICOM + data.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.HealthcareApis/workspaces/dicomservices/resources/read\"],\"notDataActions\":[]}],\"createdOn\":\"2021-06-17T20:58:30.1630494Z\",\"updatedOn\":\"2021-06-17T20:58:30.1630494Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/e89c7a3c-2f64-4fa1-a847-3e4c9ba4283a\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"e89c7a3c-2f64-4fa1-a847-3e4c9ba4283a\"},{\"properties\":{\"roleName\":\"DICOM + Data Owner\",\"type\":\"BuiltInRole\",\"description\":\"Full access to DICOM + data.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[],\"notActions\":[],\"dataActions\":[\"Microsoft.HealthcareApis/workspaces/dicomservices/resources/*\"],\"notDataActions\":[]}],\"createdOn\":\"2021-06-17T20:59:30.8659515Z\",\"updatedOn\":\"2021-06-17T20:59:30.8659515Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/58a3b984-7adf-4c20-983a-32417c86fbc8\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"58a3b984-7adf-4c20-983a-32417c86fbc8\"},{\"properties\":{\"roleName\":\"EventGrid + Data Sender\",\"type\":\"BuiltInRole\",\"description\":\"Allows send access + to event grid events.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Authorization/*/read\",\"Microsoft.EventGrid/topics/read\",\"Microsoft.EventGrid/domains/read\",\"Microsoft.EventGrid/partnerNamespaces/read\",\"Microsoft.Resources/subscriptions/resourceGroups/read\"],\"notActions\":[],\"dataActions\":[\"Microsoft.EventGrid/events/send/action\"],\"notDataActions\":[]}],\"createdOn\":\"2021-07-02T21:55:40.4847495Z\",\"updatedOn\":\"2021-07-02T21:55:40.4847495Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/d5a91429-5739-47e2-a06b-3470a27159e7\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"d5a91429-5739-47e2-a06b-3470a27159e7\"}]}" + headers: + cache-control: + - no-cache + content-length: + - '301837' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:17:28 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"objectIds": ["b9c6016b-2e30-45fa-964e-414f0fc9272a"], "includeDirectoryObjectReferences": + true}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + Content-Length: + - '97' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.26.0 + accept-language: + - en-US + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/getObjectsByObjectIds?api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.User","objectType":"User","objectId":"b9c6016b-2e30-45fa-964e-414f0fc9272a","deletionTimestamp":null,"accountEnabled":true,"ageGroup":null,"assignedLicenses":[],"assignedPlans":[],"city":null,"companyName":null,"consentProvidedForMinor":null,"country":null,"createdDateTime":"2021-05-28T09:30:27Z","creationType":"Invitation","department":null,"dirSyncEnabled":null,"displayName":"Kaihui + Sun (Wicresoft North America Ltd)","employeeId":null,"facsimileTelephoneNumber":null,"givenName":"Kaihui","immutableId":null,"isCompromised":null,"jobTitle":null,"lastDirSyncTime":null,"legalAgeGroupClassification":null,"mail":"v-kaisun@microsoft.com","mailNickname":"v-kaisun_microsoft.com#EXT#","mobile":null,"onPremisesDistinguishedName":null,"onPremisesSecurityIdentifier":null,"otherMails":["v-kaisun@microsoft.com"],"passwordPolicies":null,"passwordProfile":null,"physicalDeliveryOfficeName":null,"postalCode":null,"preferredLanguage":null,"provisionedPlans":[],"provisioningErrors":[],"proxyAddresses":["SMTP:v-kaisun@microsoft.com"],"refreshTokensValidFromDateTime":"2021-05-28T09:30:27Z","showInAddressList":false,"signInNames":[],"sipProxyAddress":null,"state":null,"streetAddress":null,"surname":"Sun","telephoneNumber":null,"thumbnailPhoto@odata.mediaEditLink":"directoryObjects/b9c6016b-2e30-45fa-964e-414f0fc9272a/Microsoft.DirectoryServices.User/thumbnailPhoto","usageLocation":null,"userIdentities":[],"userPrincipalName":"v-kaisun_microsoft.com#EXT#@mpliftrconfluent20210809out.onmicrosoft.com","userState":"Accepted","userStateChangedOn":"2021-07-05T05:41:25Z","userType":"Member"}]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '1751' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Tue, 06 Jul 2021 09:17:29 GMT + duration: + - '2534321' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - 7/4AuFzzUJYzyT+uu0dvEanry/R/e/65JeNegWAaIs4= + ocp-aad-session-key: + - J9ShK6ybnNnOHo1NLsH89lRpcxm1rRiE5EixfhvyOq-oI9wHRRHc3RLXnnXfjJOTD8yJsDPZf5Qz5Y5jeae1_-lOCZ_SPCxIhaH3-X2V0bztPJ2_BkzTjlMdNsYjhmsl.FhkYQDhEpFnyDv-8aFkJawYMWWKrY7aqG8EqcLbVigA + pragma: + - no-cache + request-id: + - 58514b52-d62b-474a-86aa-9d612649155d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-ms-resource-unit: + - '3' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"tags": {"environment": "Dev"}, "location": "eastus2euap", "properties": + {"offerDetail": {"publisherId": "confluentinc", "id": "confluent-cloud-azure-stag", + "planId": "confluent-cloud-azure-payg-stag", "planName": "Confluent Cloud - + Pay as you Go", "termUnit": "P1M"}, "userDetail": {"firstName": "Kaihui", "lastName": + "Sun", "emailAddress": "v-kaisun@microsoft.com"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + Content-Length: + - '370' + Content-Type: + - application/json + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - AZURECLI/2.26.0 azsdk-python-mgmt-confluent/1.0.0b1 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_term_accept_basic_flow000001/providers/Microsoft.Confluent/organizations/cliTestOrg-1?api-version=2021-03-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_term_accept_basic_flow000001/providers/Microsoft.Confluent/organizations/cliTestOrg-1","name":"cliTestOrg-1","type":"microsoft.confluent/organizations","location":"eastus2euap","tags":{"environment":"Dev"},"systemData":{"createdBy":"v-kaisun@microsoft.com","createdByType":"User","createdAt":"2021-07-06T09:17:38.7050902Z","lastModifiedBy":"v-kaisun@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-07-06T09:17:38.7050902Z"},"properties":{"createdTime":"2021-07-06T09:17:41.7881649Z","provisioningState":"Accepted","organizationId":null,"ssoUrl":null,"offerDetail":{"publisherId":"confluentinc","id":"confluent-cloud-azure-stag","planId":"confluent-cloud-azure-payg-stag","planName":"Confluent + Cloud - Pay as you Go","termUnit":"P1M","status":"Started"},"userDetail":{"firstName":"Kaihui","lastName":"Sun","emailAddress":"v-kaisun@microsoft.com"}}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.Confluent/locations/EASTUS2EUAP/operationStatuses/96ff362f-1a60-4a3f-9936-f55f491d8ad0?api-version=2021-03-01-preview + cache-control: + - no-cache + content-length: + - '986' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:17:43 GMT + etag: + - '"0a007c6e-0000-3400-0000-60e41fb50000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.Confluent/locations/EASTUS2EUAP/operationStatuses/96ff362f-1a60-4a3f-9936-f55f491d8ad0?api-version=2021-03-01-preview + pragma: + - no-cache + request-context: + - appId=cid-v1:44fd1f8b-df35-48c9-8fa6-f5e19b8bb5be + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - AZURECLI/2.26.0 azsdk-python-mgmt-confluent/1.0.0b1 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.Confluent/locations/EASTUS2EUAP/operationStatuses/96ff362f-1a60-4a3f-9936-f55f491d8ad0?api-version=2021-03-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.Confluent/locations/EASTUS2EUAP/operationStatuses/96ff362f-1a60-4a3f-9936-f55f491d8ad0","name":"96ff362f-1a60-4a3f-9936-f55f491d8ad0","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_term_accept_basic_flow000001/providers/Microsoft.Confluent/organizations/cliTestOrg-1","status":"Accepted","startTime":"2021-07-06T09:17:41.7768392Z"}' + headers: + cache-control: + - no-cache + content-length: + - '440' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:18:14 GMT + etag: + - '"0500ab77-0000-3400-0000-60e41fb50000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - AZURECLI/2.26.0 azsdk-python-mgmt-confluent/1.0.0b1 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.Confluent/locations/EASTUS2EUAP/operationStatuses/96ff362f-1a60-4a3f-9936-f55f491d8ad0?api-version=2021-03-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.Confluent/locations/EASTUS2EUAP/operationStatuses/96ff362f-1a60-4a3f-9936-f55f491d8ad0","name":"96ff362f-1a60-4a3f-9936-f55f491d8ad0","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_term_accept_basic_flow000001/providers/Microsoft.Confluent/organizations/cliTestOrg-1","status":"Accepted","startTime":"2021-07-06T09:17:41.7768392Z"}' + headers: + cache-control: + - no-cache + content-length: + - '440' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:18:44 GMT + etag: + - '"0500ab77-0000-3400-0000-60e41fb50000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - AZURECLI/2.26.0 azsdk-python-mgmt-confluent/1.0.0b1 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.Confluent/locations/EASTUS2EUAP/operationStatuses/96ff362f-1a60-4a3f-9936-f55f491d8ad0?api-version=2021-03-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.Confluent/locations/EASTUS2EUAP/operationStatuses/96ff362f-1a60-4a3f-9936-f55f491d8ad0","name":"96ff362f-1a60-4a3f-9936-f55f491d8ad0","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_term_accept_basic_flow000001/providers/Microsoft.Confluent/organizations/cliTestOrg-1","status":"Accepted","startTime":"2021-07-06T09:17:41.7768392Z"}' + headers: + cache-control: + - no-cache + content-length: + - '440' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:19:14 GMT + etag: + - '"0500ab77-0000-3400-0000-60e41fb50000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - AZURECLI/2.26.0 azsdk-python-mgmt-confluent/1.0.0b1 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.Confluent/locations/EASTUS2EUAP/operationStatuses/96ff362f-1a60-4a3f-9936-f55f491d8ad0?api-version=2021-03-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.Confluent/locations/EASTUS2EUAP/operationStatuses/96ff362f-1a60-4a3f-9936-f55f491d8ad0","name":"96ff362f-1a60-4a3f-9936-f55f491d8ad0","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_term_accept_basic_flow000001/providers/Microsoft.Confluent/organizations/cliTestOrg-1","status":"Accepted","startTime":"2021-07-06T09:17:41.7768392Z"}' + headers: + cache-control: + - no-cache + content-length: + - '440' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:19:45 GMT + etag: + - '"0500ab77-0000-3400-0000-60e41fb50000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - AZURECLI/2.26.0 azsdk-python-mgmt-confluent/1.0.0b1 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.Confluent/locations/EASTUS2EUAP/operationStatuses/96ff362f-1a60-4a3f-9936-f55f491d8ad0?api-version=2021-03-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.Confluent/locations/EASTUS2EUAP/operationStatuses/96ff362f-1a60-4a3f-9936-f55f491d8ad0","name":"96ff362f-1a60-4a3f-9936-f55f491d8ad0","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_term_accept_basic_flow000001/providers/Microsoft.Confluent/organizations/cliTestOrg-1","status":"Accepted","startTime":"2021-07-06T09:17:41.7768392Z"}' + headers: + cache-control: + - no-cache + content-length: + - '440' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:20:15 GMT + etag: + - '"0500ab77-0000-3400-0000-60e41fb50000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - AZURECLI/2.26.0 azsdk-python-mgmt-confluent/1.0.0b1 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.Confluent/locations/EASTUS2EUAP/operationStatuses/96ff362f-1a60-4a3f-9936-f55f491d8ad0?api-version=2021-03-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.Confluent/locations/EASTUS2EUAP/operationStatuses/96ff362f-1a60-4a3f-9936-f55f491d8ad0","name":"96ff362f-1a60-4a3f-9936-f55f491d8ad0","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_term_accept_basic_flow000001/providers/Microsoft.Confluent/organizations/cliTestOrg-1","status":"Creating","startTime":"2021-07-06T09:17:41.7768392Z","error":{}}' + headers: + cache-control: + - no-cache + content-length: + - '451' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:20:45 GMT + etag: + - '"05000579-0000-3400-0000-60e4205c0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - AZURECLI/2.26.0 azsdk-python-mgmt-confluent/1.0.0b1 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.Confluent/locations/EASTUS2EUAP/operationStatuses/96ff362f-1a60-4a3f-9936-f55f491d8ad0?api-version=2021-03-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.Confluent/locations/EASTUS2EUAP/operationStatuses/96ff362f-1a60-4a3f-9936-f55f491d8ad0","name":"96ff362f-1a60-4a3f-9936-f55f491d8ad0","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_term_accept_basic_flow000001/providers/Microsoft.Confluent/organizations/cliTestOrg-1","status":"Succeeded","startTime":"2021-07-06T09:17:41.7768392Z","endTime":"2021-07-06T09:20:57.2403488Z","error":{},"properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '511' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:21:15 GMT + etag: + - '"05008979-0000-3400-0000-60e420790000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - confluent organization create + Connection: + - keep-alive + ParameterSetName: + - --location --offer-id --plan-id --plan-name --publisher-id --term-unit --tags + --name --resource-group + User-Agent: + - AZURECLI/2.26.0 azsdk-python-mgmt-confluent/1.0.0b1 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_term_accept_basic_flow000001/providers/Microsoft.Confluent/organizations/cliTestOrg-1?api-version=2021-03-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_term_accept_basic_flow000001/providers/Microsoft.Confluent/organizations/cliTestOrg-1","name":"cliTestOrg-1","type":"microsoft.confluent/organizations","location":"eastus2euap","tags":{"environment":"Dev"},"systemData":{"createdBy":"v-kaisun@microsoft.com","createdByType":"User","createdAt":"2021-07-06T09:17:38.7050902Z","lastModifiedBy":"1448fd13-7e74-41f4-b6e3-17e485d8ac2e","lastModifiedByType":"Application","lastModifiedAt":"2021-07-06T09:20:57.3899991Z"},"properties":{"createdTime":"2021-07-06T09:17:41.7881649Z","provisioningState":"Succeeded","offerDetail":{"publisherId":"confluentinc","id":"confluent-cloud-azure-stag","planId":"confluent-cloud-azure-payg-stag","planName":"Confluent + Cloud - Pay as you Go","termUnit":"P1M","status":"Started"},"userDetail":{"firstName":"Kaihui","lastName":"Sun","emailAddress":"v-kaisun@microsoft.com"},"organizationId":"59e0583e-ba4a-46ef-bdd1-dca7dea65f95","ssoUrl":"https://stag.cpdev.cloud/login/sso/59e0583e-ba4a-46ef-bdd1-dca7dea65f95"}}' + headers: + cache-control: + - no-cache + content-length: + - '1111' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Jul 2021 09:21:16 GMT + etag: + - '"0a00c46f-0000-3400-0000-60e420790000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +version: 1 diff --git a/src/confluent/azext_confluent/tests/latest/test_confluent_scenario.py b/src/confluent/azext_confluent/tests/latest/test_confluent_scenario.py index f855240a37a..24650b54a0f 100644 --- a/src/confluent/azext_confluent/tests/latest/test_confluent_scenario.py +++ b/src/confluent/azext_confluent/tests/latest/test_confluent_scenario.py @@ -47,6 +47,8 @@ def step_offer_detail_show(test, rg, checks=None): if term_unit.get('termUnits', None): assert term_unit['termUnits'] in ['P1M', 'P1Y'] assert term_unit.get('price', None) is not None + assert term_unit['price'].get('isPIRequired', None) is None + assert term_unit['price'].get('msrp', None) is None assert term_unit.get('termDescription', None) is not None diff --git a/src/confluent/azext_confluent/tests/latest/test_confluent_scenario_coverage.md b/src/confluent/azext_confluent/tests/latest/test_confluent_scenario_coverage.md index 789db8ad7d9..acfe1012371 100644 --- a/src/confluent/azext_confluent/tests/latest/test_confluent_scenario_coverage.md +++ b/src/confluent/azext_confluent/tests/latest/test_confluent_scenario_coverage.md @@ -1,8 +1,8 @@ |Scenario|Result|ErrorMessage|ErrorStack|ErrorNormalized|StartDt|EndDt| -|step_terms_list|successed||||2021-06-21 02:44:44.694501|2021-06-21 02:44:44.946485| -|step_organization_show|successed||||2021-06-21 02:44:45.356491|2021-06-21 02:44:45.449457| -|step_organization_list|successed||||2021-06-21 02:44:45.449457|2021-06-21 02:44:45.571478| -|step_organization_list2|successed||||2021-06-21 02:44:45.572449|2021-06-21 02:44:45.670480| -|step_organization_update|successed||||2021-06-21 02:44:45.671479|2021-06-21 02:44:45.766477| -|step_organization_delete|successed||||2021-06-21 02:44:45.767451|2021-06-21 02:44:45.991454| +|step_terms_list|successed||||2021-07-07 05:49:18.241849|2021-07-07 05:49:18.473003| +|step_organization_show|successed||||2021-07-07 05:49:18.846170|2021-07-07 05:49:18.948916| +|step_organization_list|successed||||2021-07-07 05:49:18.948916|2021-07-07 05:49:19.053372| +|step_organization_list2|successed||||2021-07-07 05:49:19.054372|2021-07-07 05:49:19.153368| +|step_organization_update|successed||||2021-07-07 05:49:19.154380|2021-07-07 05:49:19.254379| +|step_organization_delete|successed||||2021-07-07 05:49:19.254379|2021-07-07 05:49:19.477328| Coverage: 6/6 diff --git a/src/confluent/azext_confluent/tests/latest/test_confluent_term_accept_flow.py b/src/confluent/azext_confluent/tests/latest/test_confluent_term_accept_flow.py new file mode 100644 index 00000000000..706e5619cbd --- /dev/null +++ b/src/confluent/azext_confluent/tests/latest/test_confluent_term_accept_flow.py @@ -0,0 +1,62 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import mock +import time + +from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer +from azure_devtools.scenario_tests import AllowLargeResponse + +from .test_confluent_scenario import mock_jwt_decode, mock_list_role_assignments + + +class TestTermAcceptFlow(ScenarioTest): + + @ResourceGroupPreparer(name_prefix='cli_test_term_accept_basic_flow', location='eastus2euap') + @AllowLargeResponse() + def test_term_accept_basic_flow(self, resource_group): + + self.kwargs.update({ + 'rg': resource_group, + 'offerId': 'confluent-cloud-azure-stag', + 'planId': 'confluent-cloud-azure-payg-stag', + 'publisherId': 'confluentinc', + 'namespace': 'Microsoft.Confluent', + 'organizationName': 'cliTestOrg-1' + }) + + self.cmd('az confluent offer-detail show ' + '--publisher-id {publisherId} ' + '--offer-id {offerId}') + + self.cmd('az term accept ' + '--product "{offerId}" ' + '--plan "{planId}" ' + '--publisher "{publisherId}"') + + self.cmd('provider register -n {namespace} ') + result = self.cmd('provider show -n {namespace}').get_output_in_json() + while result['registrationState'] != 'Registered': + time.sleep(5) + result = self.cmd('provider show -n {namespace}').get_output_in_json() + + with mock.patch('jwt.decode', mock_jwt_decode): + with mock.patch('azure.cli.command_modules.role.custom.list_role_assignments', mock_list_role_assignments): + self.cmd('az confluent organization create ' + '--location "eastus2euap" ' + '--offer-id "{offerId}" ' + '--plan-id "{planId}" ' + '--plan-name "Confluent Cloud - Pay as you Go" ' + '--publisher-id "{publisherId}" ' + '--term-unit "P1M" ' + '--tags environment="Dev" ' + '--name "{organizationName}" ' + '--resource-group "{rg}"') + diff --git a/src/confluent/setup.py b/src/confluent/setup.py index 5a4bc24de69..ccd85a192c4 100644 --- a/src/confluent/setup.py +++ b/src/confluent/setup.py @@ -10,7 +10,7 @@ from setuptools import setup, find_packages # HISTORY.rst entry. -VERSION = '0.1.0' +VERSION = '0.3.0' try: from azext_confluent.manual.version import VERSION except ImportError: diff --git a/src/datafactory/HISTORY.rst b/src/datafactory/HISTORY.rst index f03bb41574e..f4e5240e156 100644 --- a/src/datafactory/HISTORY.rst +++ b/src/datafactory/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.4.0 ++++++ +* GA the whole module + 0.3.0 +++++ * [BREAKING CHANGE] Renamed command subgroup `az datafactory factory` to `az datafactory`. diff --git a/src/datafactory/azext_datafactory/azext_metadata.json b/src/datafactory/azext_datafactory/azext_metadata.json index cfc30c747c7..3695b0d7077 100644 --- a/src/datafactory/azext_datafactory/azext_metadata.json +++ b/src/datafactory/azext_datafactory/azext_metadata.json @@ -1,4 +1,3 @@ { - "azext.isExperimental": true, "azext.minCliCoreVersion": "2.15.0" } \ No newline at end of file diff --git a/src/datafactory/azext_datafactory/generated/commands.py b/src/datafactory/azext_datafactory/generated/commands.py index df59d171a88..83b7f9db34e 100644 --- a/src/datafactory/azext_datafactory/generated/commands.py +++ b/src/datafactory/azext_datafactory/generated/commands.py @@ -20,7 +20,7 @@ def load_command_table(self, _): operations_tmpl='azext_datafactory.vendored_sdks.datafactory.operations._factories_operations#FactoriesOperatio' 'ns.{}', client_factory=cf_factory) - with self.command_group('datafactory', datafactory_factory, client_factory=cf_factory, is_experimental=True) as g: + with self.command_group('datafactory', datafactory_factory, client_factory=cf_factory) as g: g.custom_command('list', 'datafactory_list') g.custom_show_command('show', 'datafactory_show') g.custom_command('create', 'datafactory_create') diff --git a/src/datafactory/azext_datafactory/manual/version.py b/src/datafactory/azext_datafactory/manual/version.py index c061ba7d594..8e3e0e73f37 100644 --- a/src/datafactory/azext_datafactory/manual/version.py +++ b/src/datafactory/azext_datafactory/manual/version.py @@ -8,4 +8,4 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.3.0" +VERSION = "0.4.0" diff --git a/src/diskpool/HISTORY.rst b/src/diskpool/HISTORY.rst index edbb6c31f6a..2efc39a9b51 100644 --- a/src/diskpool/HISTORY.rst +++ b/src/diskpool/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +0.1.2 +++++++ +* Refine table output +* Add `az disk-pool list-outbound-network-dependency-endpoint` command + 0.1.1 ++++++ * Fix generation issue. diff --git a/src/diskpool/azext_diskpool/generated/_help.py b/src/diskpool/azext_diskpool/generated/_help.py index 0c0f40fb142..112206e13a8 100644 --- a/src/diskpool/azext_diskpool/generated/_help.py +++ b/src/diskpool/azext_diskpool/generated/_help.py @@ -98,6 +98,16 @@ az disk-pool delete --name "myDiskPool" --resource-group "myResourceGroup" """ +helps['disk-pool list-outbound-network-dependency-endpoint'] = """ + type: command + short-summary: "Gets the network endpoints of all outbound dependencies of a Disk Pool." + examples: + - name: Get Disk Pool outbound network dependencies + text: |- + az disk-pool list-outbound-network-dependency-endpoint --name "SampleAse" --resource-group \ +"Sample-WestUSResourceGroup" +""" + helps['disk-pool list-skus'] = """ type: command short-summary: "Lists available Disk Pool Skus in an Azure location." diff --git a/src/diskpool/azext_diskpool/generated/_params.py b/src/diskpool/azext_diskpool/generated/_params.py index 8dd4b8bbe98..8d3db239f9c 100644 --- a/src/diskpool/azext_diskpool/generated/_params.py +++ b/src/diskpool/azext_diskpool/generated/_params.py @@ -66,6 +66,11 @@ def load_arguments(self, _): c.argument('disk_pool_name', options_list=['--name', '-n', '--disk-pool-name'], type=str, help='The name of ' 'the Disk Pool.', id_part='name') + with self.argument_context('disk-pool list-outbound-network-dependency-endpoint') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('disk_pool_name', options_list=['--name', '-n', '--disk-pool-name'], type=str, help='The name of ' + 'the Disk Pool.') + with self.argument_context('disk-pool list-skus') as c: c.argument('location', arg_type=get_location_type(self.cli_ctx)) diff --git a/src/diskpool/azext_diskpool/generated/action.py b/src/diskpool/azext_diskpool/generated/action.py index 62b0d509d18..7b3a1e1ec8d 100644 --- a/src/diskpool/azext_diskpool/generated/action.py +++ b/src/diskpool/azext_diskpool/generated/action.py @@ -49,7 +49,7 @@ def __call__(self, parser, namespace, values, option_string=None): def get_action(self, values, option_string=None): try: - value_chunk_list = [values[x:x + 1] for x in range(0, len(values), 1)] + value_chunk_list = [values[x: x + 1] for x in range(0, len(values), 1)] value_list = [] for chunk in value_chunk_list: id, = chunk @@ -71,7 +71,7 @@ def __call__(self, parser, namespace, values, option_string=None): def get_action(self, values, option_string=None): try: - value_chunk_list = [values[x:x + 1] for x in range(0, len(values), 1)] + value_chunk_list = [values[x: x + 1] for x in range(0, len(values), 1)] value_list = [] for chunk in value_chunk_list: id, = chunk diff --git a/src/diskpool/azext_diskpool/generated/commands.py b/src/diskpool/azext_diskpool/generated/commands.py index 8e50bd24d4d..0a45ae9cca1 100644 --- a/src/diskpool/azext_diskpool/generated/commands.py +++ b/src/diskpool/azext_diskpool/generated/commands.py @@ -26,6 +26,8 @@ def load_command_table(self, _): g.custom_command('create', 'disk_pool_create', supports_no_wait=True) g.custom_command('update', 'disk_pool_update', supports_no_wait=True) g.custom_command('delete', 'disk_pool_delete', supports_no_wait=True, confirmation=True) + g.custom_command('list-outbound-network-dependency-endpoint', 'disk_pool_list_outbound_network_dependency_endpo' + 'int') g.custom_command('list-skus', 'disk_pool_list_skus') g.custom_command('start', 'disk_pool_start', supports_no_wait=True) g.custom_command('stop', 'disk_pool_stop', supports_no_wait=True) diff --git a/src/diskpool/azext_diskpool/generated/custom.py b/src/diskpool/azext_diskpool/generated/custom.py index 811c1c55e08..f16877572dc 100644 --- a/src/diskpool/azext_diskpool/generated/custom.py +++ b/src/diskpool/azext_diskpool/generated/custom.py @@ -78,6 +78,13 @@ def disk_pool_delete(client, disk_pool_name=disk_pool_name) +def disk_pool_list_outbound_network_dependency_endpoint(client, + resource_group_name, + disk_pool_name): + return client.list_outbound_network_dependencies_endpoints(resource_group_name=resource_group_name, + disk_pool_name=disk_pool_name) + + def disk_pool_list_skus(client, location): return client.list(location=location) diff --git a/src/diskpool/azext_diskpool/manual/_transformers.py b/src/diskpool/azext_diskpool/manual/_transformers.py index f6262db3cda..b5c74eeb970 100644 --- a/src/diskpool/azext_diskpool/manual/_transformers.py +++ b/src/diskpool/azext_diskpool/manual/_transformers.py @@ -18,6 +18,8 @@ def _value_from_path(each_item, path): try: for part in path.split('.'): obj = obj.get(part, None) + if isinstance(obj, list): + obj = _process_array(obj) except AttributeError: obj = None return obj or ' ' @@ -35,8 +37,56 @@ def transform_disk_pool_list_output(result): usable by the CLI and tools such as jpterm. """ return build_table_output(result, [ ('Name', 'name'), - ('Availability Zones', 'availabilityZones'), + ('Resource Group', 'resourceGroup'), ('Status', 'status'), ('Location', 'location'), ('Last Modified', 'systemData.lastModifiedAt') ]) + + +def transform_disk_pool_show_output(result): + from collections import OrderedDict + + new_result = OrderedDict() + new_result['Name'] = result.pop('name') + new_result['Resource Group'] = result.pop('resourceGroup') + new_result['Status'] = result.pop('status') + new_result['Location'] = result.pop('location') + new_result['Last Modified'] = result.get('systemData').get('lastModifiedAt', None) \ + if result.get('systemData') else None + return new_result + + +def transform_disk_pool_iscsi_target_list_output(result): + """ Transform to convert SDK output into a form that is more readily + usable by the CLI and tools such as jpterm. """ + return build_table_output(result, [ + ('Name', 'name'), + ('Acl Mode', 'aclMode'), + ('Endpoints', 'endpoints'), + ('Status', 'status'), + ('Provisioning State', 'provisioningState'), + ('Target Iqn', 'targetIqn') + ]) + + +def _process_array(array): + if array: + item = ','.join(array) + else: + item = None + return item + + +def transform_disk_pool_iscsi_target_show_output(result): + from collections import OrderedDict + + new_result = OrderedDict() + new_result['Name'] = result.pop('name') + new_result['Acl Mode'] = result.pop('aclMode') + new_result['Endpoints'] = _process_array(result.pop('endpoints')) + + new_result['Status'] = result['status'] + new_result['Provisioning State'] = result['provisioningState'] + new_result['Target Iqn'] = result['targetIqn'] + return new_result diff --git a/src/diskpool/azext_diskpool/manual/commands.py b/src/diskpool/azext_diskpool/manual/commands.py index b8d9a139915..ffeac7926b0 100644 --- a/src/diskpool/azext_diskpool/manual/commands.py +++ b/src/diskpool/azext_diskpool/manual/commands.py @@ -14,13 +14,22 @@ def load_command_table(self, _): - from azext_diskpool.generated._client_factory import cf_disk_pool + from azext_diskpool.generated._client_factory import cf_disk_pool, cf_iscsi_target from azext_diskpool.manual._client_factory import cf_disk_pool_zone diskpool_disk_pool = CliCommandType( operations_tmpl='azext_diskpool.vendored_sdks.storagepool.operations._disk_pools_operations#DiskPoolsOperations' '.{}', client_factory=cf_disk_pool) with self.command_group('disk-pool', diskpool_disk_pool, client_factory=cf_disk_pool, is_preview=True) as g: - from ._transformers import transform_disk_pool_list_output + from ._transformers import transform_disk_pool_list_output, transform_disk_pool_show_output g.custom_command('list', 'disk_pool_list', table_transformer=transform_disk_pool_list_output) g.custom_command('list-skus', 'disk_pool_list_skus', client_factory=cf_disk_pool_zone) + g.custom_show_command('show', 'disk_pool_show', table_transformer=transform_disk_pool_show_output) + + with self.command_group('disk-pool iscsi-target', client_factory=cf_iscsi_target) as g: + from ._transformers import transform_disk_pool_iscsi_target_list_output, \ + transform_disk_pool_iscsi_target_show_output + g.custom_command('list', 'disk_pool_iscsi_target_list', + table_transformer=transform_disk_pool_iscsi_target_list_output) + g.custom_show_command('show', 'disk_pool_iscsi_target_show', + table_transformer=transform_disk_pool_iscsi_target_show_output) diff --git a/src/diskpool/azext_diskpool/tests/latest/recordings/test_diskpool_list_sku_scenario_manual.yaml b/src/diskpool/azext_diskpool/tests/latest/recordings/test_diskpool_list_sku_scenario_manual.yaml index 99a6467c94e..bb8182a4652 100644 --- a/src/diskpool/azext_diskpool/tests/latest/recordings/test_diskpool_list_sku_scenario_manual.yaml +++ b/src/diskpool/azext_diskpool/tests/latest/recordings/test_diskpool_list_sku_scenario_manual.yaml @@ -13,7 +13,7 @@ interactions: ParameterSetName: - -l User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.24.2 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/diskPoolZones?api-version=2021-04-01-preview response: @@ -27,7 +27,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 10:36:03 GMT + - Thu, 10 Jun 2021 09:31:53 GMT expires: - '-1' pragma: diff --git a/src/diskpool/azext_diskpool/tests/latest/recordings/test_diskpool_scenario_manual.yaml b/src/diskpool/azext_diskpool/tests/latest/recordings/test_diskpool_scenario_manual.yaml index a32e83957a8..fe934cf637b 100644 --- a/src/diskpool/azext_diskpool/tests/latest/recordings/test_diskpool_scenario_manual.yaml +++ b/src/diskpool/azext_diskpool/tests/latest/recordings/test_diskpool_scenario_manual.yaml @@ -2,7 +2,7 @@ interactions: - request: body: '{"location": "eastus", "tags": {}, "sku": {"name": "Premium_LRS"}, "zones": ["3"], "properties": {"hyperVGeneration": "V1", "creationData": {"createOption": - "Empty"}, "diskSizeGB": 256, "maxShares": 2}}' + "Empty"}, "diskSizeGB": 1024, "maxShares": 2}}' headers: Accept: - application/json @@ -13,13 +13,13 @@ interactions: Connection: - keep-alive Content-Length: - - '202' + - '203' Content-Type: - application/json ParameterSetName: - --name --resource-group --zone --location --sku --max-shares --size-gb User-Agent: - - AZURECLI/2.24.0 azsdk-python-azure-mgmt-compute/21.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-compute/21.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002?api-version=2020-12-01 response: @@ -28,23 +28,23 @@ interactions: \ \"tags\": {},\r\n \"zones\": [\r\n \"3\"\r\n ],\r\n \"sku\": {\r\n \ \"name\": \"Premium_LRS\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n - \ },\r\n \"diskSizeGB\": 256,\r\n \"maxShares\": 2,\r\n \"provisioningState\": + \ },\r\n \"diskSizeGB\": 1024,\r\n \"maxShares\": 2,\r\n \"provisioningState\": \"Updating\",\r\n \"isArmResource\": true\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/5d336f6f-1ae6-46d4-bae5-6c8fd6c03697?api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/2da3eb32-912c-4324-9d10-0826e1ac30fd?api-version=2020-12-01 cache-control: - no-cache content-length: - - '370' + - '371' content-type: - application/json; charset=utf-8 date: - - Tue, 01 Jun 2021 08:59:21 GMT + - Wed, 16 Jun 2021 03:31:10 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/5d336f6f-1ae6-46d4-bae5-6c8fd6c03697?monitor=true&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/2da3eb32-912c-4324-9d10-0826e1ac30fd?monitor=true&api-version=2020-12-01 pragma: - no-cache server: @@ -57,7 +57,7 @@ interactions: x-ms-ratelimit-remaining-resource: - Microsoft.Compute/CreateUpdateDisks3Min;999,Microsoft.Compute/CreateUpdateDisks30Min;7999 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 202 message: Accepted @@ -75,36 +75,36 @@ interactions: ParameterSetName: - --name --resource-group --zone --location --sku --max-shares --size-gb User-Agent: - - AZURECLI/2.24.0 azsdk-python-azure-mgmt-compute/21.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-compute/21.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/5d336f6f-1ae6-46d4-bae5-6c8fd6c03697?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/2da3eb32-912c-4324-9d10-0826e1ac30fd?api-version=2020-12-01 response: body: - string: "{\r\n \"startTime\": \"2021-06-01T08:59:21.7454367+00:00\",\r\n \"endTime\": - \"2021-06-01T08:59:21.8235646+00:00\",\r\n \"status\": \"Succeeded\",\r\n + string: "{\r\n \"startTime\": \"2021-06-16T03:31:11.0030381+00:00\",\r\n \"endTime\": + \"2021-06-16T03:31:11.1592866+00:00\",\r\n \"status\": \"Succeeded\",\r\n \ \"properties\": {\r\n \"output\": {\r\n \"name\": \"disk000002\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002\",\r\n \ \"type\": \"Microsoft.Compute/disks\",\r\n \"location\": \"eastus\",\r\n \ \"tags\": {},\r\n \"zones\": [\r\n \"3\"\r\n ],\r\n \"sku\": {\r\n \ \"name\": \"Premium_LRS\",\r\n \"tier\": \"Premium\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n \"creationData\": {\r\n \"createOption\": - \"Empty\"\r\n },\r\n \"diskSizeGB\": 256,\r\n \"diskIOPSReadWrite\": - 1100,\r\n \"diskMBpsReadWrite\": 125,\r\n \"encryption\": {\r\n \"type\": + \"Empty\"\r\n },\r\n \"diskSizeGB\": 1024,\r\n \"diskIOPSReadWrite\": + 5000,\r\n \"diskMBpsReadWrite\": 200,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"maxShares\": 2,\r\n - \ \"timeCreated\": \"2021-06-01T08:59:21.7454367+00:00\",\r\n \"provisioningState\": + \ \"timeCreated\": \"2021-06-16T03:31:11.0030381+00:00\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n \"diskSizeBytes\": - 274877906944,\r\n \"uniqueId\": \"1c6c0c9d-f14c-4e8b-a768-b7b73d8bd9ba\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\",\r\n \"tier\": \"P15\"\r\n }\r\n}\r\n - \ },\r\n \"name\": \"5d336f6f-1ae6-46d4-bae5-6c8fd6c03697\"\r\n}" + 1099511627776,\r\n \"uniqueId\": \"19fc04e9-c43f-4dbf-b023-591917ca0ffa\",\r\n + \ \"networkAccessPolicy\": \"AllowAll\",\r\n \"tier\": \"P30\"\r\n }\r\n}\r\n + \ },\r\n \"name\": \"2da3eb32-912c-4324-9d10-0826e1ac30fd\"\r\n}" headers: cache-control: - no-cache content-length: - - '1154' + - '1156' content-type: - application/json; charset=utf-8 date: - - Tue, 01 Jun 2021 08:59:24 GMT + - Wed, 16 Jun 2021 03:31:12 GMT expires: - '-1' pragma: @@ -121,7 +121,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49999,Microsoft.Compute/GetOperation30Min;399995 + - Microsoft.Compute/GetOperation3Min;49999,Microsoft.Compute/GetOperation30Min;399999 status: code: 200 message: OK @@ -139,7 +139,7 @@ interactions: ParameterSetName: - --name --resource-group --zone --location --sku --max-shares --size-gb User-Agent: - - AZURECLI/2.24.0 azsdk-python-azure-mgmt-compute/21.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-compute/21.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002?api-version=2020-12-01 response: @@ -149,22 +149,22 @@ interactions: \ \"tags\": {},\r\n \"zones\": [\r\n \"3\"\r\n ],\r\n \"sku\": {\r\n \ \"name\": \"Premium_LRS\",\r\n \"tier\": \"Premium\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n \"creationData\": {\r\n \"createOption\": - \"Empty\"\r\n },\r\n \"diskSizeGB\": 256,\r\n \"diskIOPSReadWrite\": - 1100,\r\n \"diskMBpsReadWrite\": 125,\r\n \"encryption\": {\r\n \"type\": + \"Empty\"\r\n },\r\n \"diskSizeGB\": 1024,\r\n \"diskIOPSReadWrite\": + 5000,\r\n \"diskMBpsReadWrite\": 200,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"maxShares\": 2,\r\n - \ \"timeCreated\": \"2021-06-01T08:59:21.7454367+00:00\",\r\n \"provisioningState\": + \ \"timeCreated\": \"2021-06-16T03:31:11.0030381+00:00\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n \"diskSizeBytes\": - 274877906944,\r\n \"uniqueId\": \"1c6c0c9d-f14c-4e8b-a768-b7b73d8bd9ba\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\",\r\n \"tier\": \"P15\"\r\n }\r\n}" + 1099511627776,\r\n \"uniqueId\": \"19fc04e9-c43f-4dbf-b023-591917ca0ffa\",\r\n + \ \"networkAccessPolicy\": \"AllowAll\",\r\n \"tier\": \"P30\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '929' + - '931' content-type: - application/json; charset=utf-8 date: - - Tue, 01 Jun 2021 08:59:24 GMT + - Wed, 16 Jun 2021 03:31:13 GMT expires: - '-1' pragma: @@ -181,14 +181,14 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;14999,Microsoft.Compute/LowCostGet30Min;119986 + - Microsoft.Compute/LowCostGet3Min;14999,Microsoft.Compute/LowCostGet30Min;119999 status: code: 200 message: OK - request: body: '{"location": "eastus", "tags": {}, "sku": {"name": "Premium_LRS"}, "zones": ["3"], "properties": {"hyperVGeneration": "V1", "creationData": {"createOption": - "Empty"}, "diskSizeGB": 256, "maxShares": 2}}' + "Empty"}, "diskSizeGB": 1024, "maxShares": 2}}' headers: Accept: - application/json @@ -199,13 +199,13 @@ interactions: Connection: - keep-alive Content-Length: - - '202' + - '203' Content-Type: - application/json ParameterSetName: - --name --resource-group --zone --location --sku --max-shares --size-gb User-Agent: - - AZURECLI/2.24.0 azsdk-python-azure-mgmt-compute/21.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-compute/21.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003?api-version=2020-12-01 response: @@ -214,23 +214,23 @@ interactions: \ \"tags\": {},\r\n \"zones\": [\r\n \"3\"\r\n ],\r\n \"sku\": {\r\n \ \"name\": \"Premium_LRS\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n - \ },\r\n \"diskSizeGB\": 256,\r\n \"maxShares\": 2,\r\n \"provisioningState\": + \ },\r\n \"diskSizeGB\": 1024,\r\n \"maxShares\": 2,\r\n \"provisioningState\": \"Updating\",\r\n \"isArmResource\": true\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/828f2c4e-3c24-4d0a-9009-6ea7ad78fc63?api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/1ba17a55-0ea1-4196-89a4-f3eb660c00a4?api-version=2020-12-01 cache-control: - no-cache content-length: - - '370' + - '371' content-type: - application/json; charset=utf-8 date: - - Tue, 01 Jun 2021 08:59:29 GMT + - Wed, 16 Jun 2021 03:31:19 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/828f2c4e-3c24-4d0a-9009-6ea7ad78fc63?monitor=true&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/1ba17a55-0ea1-4196-89a4-f3eb660c00a4?monitor=true&api-version=2020-12-01 pragma: - no-cache server: @@ -261,36 +261,36 @@ interactions: ParameterSetName: - --name --resource-group --zone --location --sku --max-shares --size-gb User-Agent: - - AZURECLI/2.24.0 azsdk-python-azure-mgmt-compute/21.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-compute/21.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/828f2c4e-3c24-4d0a-9009-6ea7ad78fc63?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/1ba17a55-0ea1-4196-89a4-f3eb660c00a4?api-version=2020-12-01 response: body: - string: "{\r\n \"startTime\": \"2021-06-01T08:59:30.3861179+00:00\",\r\n \"endTime\": - \"2021-06-01T08:59:30.479939+00:00\",\r\n \"status\": \"Succeeded\",\r\n + string: "{\r\n \"startTime\": \"2021-06-16T03:31:20.1281527+00:00\",\r\n \"endTime\": + \"2021-06-16T03:31:20.2687482+00:00\",\r\n \"status\": \"Succeeded\",\r\n \ \"properties\": {\r\n \"output\": {\r\n \"name\": \"disk000003\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003\",\r\n \ \"type\": \"Microsoft.Compute/disks\",\r\n \"location\": \"eastus\",\r\n \ \"tags\": {},\r\n \"zones\": [\r\n \"3\"\r\n ],\r\n \"sku\": {\r\n \ \"name\": \"Premium_LRS\",\r\n \"tier\": \"Premium\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n \"creationData\": {\r\n \"createOption\": - \"Empty\"\r\n },\r\n \"diskSizeGB\": 256,\r\n \"diskIOPSReadWrite\": - 1100,\r\n \"diskMBpsReadWrite\": 125,\r\n \"encryption\": {\r\n \"type\": + \"Empty\"\r\n },\r\n \"diskSizeGB\": 1024,\r\n \"diskIOPSReadWrite\": + 5000,\r\n \"diskMBpsReadWrite\": 200,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"maxShares\": 2,\r\n - \ \"timeCreated\": \"2021-06-01T08:59:30.4017667+00:00\",\r\n \"provisioningState\": + \ \"timeCreated\": \"2021-06-16T03:31:20.1281527+00:00\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n \"diskSizeBytes\": - 274877906944,\r\n \"uniqueId\": \"e84c4ad6-4bc2-4699-bd89-710672c11bf9\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\",\r\n \"tier\": \"P15\"\r\n }\r\n}\r\n - \ },\r\n \"name\": \"828f2c4e-3c24-4d0a-9009-6ea7ad78fc63\"\r\n}" + 1099511627776,\r\n \"uniqueId\": \"433830d0-838a-49cf-872f-074880bd4a1f\",\r\n + \ \"networkAccessPolicy\": \"AllowAll\",\r\n \"tier\": \"P30\"\r\n }\r\n}\r\n + \ },\r\n \"name\": \"1ba17a55-0ea1-4196-89a4-f3eb660c00a4\"\r\n}" headers: cache-control: - no-cache content-length: - - '1153' + - '1156' content-type: - application/json; charset=utf-8 date: - - Tue, 01 Jun 2021 08:59:32 GMT + - Wed, 16 Jun 2021 03:31:21 GMT expires: - '-1' pragma: @@ -307,7 +307,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49997,Microsoft.Compute/GetOperation30Min;399993 + - Microsoft.Compute/GetOperation3Min;49997,Microsoft.Compute/GetOperation30Min;399997 status: code: 200 message: OK @@ -325,7 +325,7 @@ interactions: ParameterSetName: - --name --resource-group --zone --location --sku --max-shares --size-gb User-Agent: - - AZURECLI/2.24.0 azsdk-python-azure-mgmt-compute/21.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-compute/21.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003?api-version=2020-12-01 response: @@ -335,22 +335,22 @@ interactions: \ \"tags\": {},\r\n \"zones\": [\r\n \"3\"\r\n ],\r\n \"sku\": {\r\n \ \"name\": \"Premium_LRS\",\r\n \"tier\": \"Premium\"\r\n },\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n \"creationData\": {\r\n \"createOption\": - \"Empty\"\r\n },\r\n \"diskSizeGB\": 256,\r\n \"diskIOPSReadWrite\": - 1100,\r\n \"diskMBpsReadWrite\": 125,\r\n \"encryption\": {\r\n \"type\": + \"Empty\"\r\n },\r\n \"diskSizeGB\": 1024,\r\n \"diskIOPSReadWrite\": + 5000,\r\n \"diskMBpsReadWrite\": 200,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"maxShares\": 2,\r\n - \ \"timeCreated\": \"2021-06-01T08:59:30.4017667+00:00\",\r\n \"provisioningState\": + \ \"timeCreated\": \"2021-06-16T03:31:20.1281527+00:00\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n \"diskSizeBytes\": - 274877906944,\r\n \"uniqueId\": \"e84c4ad6-4bc2-4699-bd89-710672c11bf9\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\",\r\n \"tier\": \"P15\"\r\n }\r\n}" + 1099511627776,\r\n \"uniqueId\": \"433830d0-838a-49cf-872f-074880bd4a1f\",\r\n + \ \"networkAccessPolicy\": \"AllowAll\",\r\n \"tier\": \"P30\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '929' + - '931' content-type: - application/json; charset=utf-8 date: - - Tue, 01 Jun 2021 08:59:32 GMT + - Wed, 16 Jun 2021 03:31:22 GMT expires: - '-1' pragma: @@ -367,7 +367,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;14996,Microsoft.Compute/LowCostGet30Min;119983 + - Microsoft.Compute/LowCostGet3Min;14997,Microsoft.Compute/LowCostGet30Min;119997 status: code: 200 message: OK @@ -391,7 +391,7 @@ interactions: - --assignee-object-id --role --scope User-Agent: - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.24.0 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.25.0 accept-language: - en-US method: POST @@ -414,19 +414,19 @@ interactions: dataserviceversion: - 3.0; date: - - Tue, 01 Jun 2021 08:59:36 GMT + - Wed, 16 Jun 2021 03:31:25 GMT duration: - - '2666773' + - '3109836' expires: - '-1' ocp-aad-diagnostics-server-name: - - sJ1Buv2k4RK8W31iECo8mAj5SrrAnlmawQNaa8bAJAI= + - n5QUhUbqhU+XtwGocvRPzUtEBzXyUogbMRaINVzZ50A= ocp-aad-session-key: - - Exa7ZPitjR3lRM6jYHcZMqA-I9R4KiLMeRiNwTcoax8H1vMgtcspiqPQJ6PYfuMm9H3fmlFJgZFIPFYhE-QQdypSS9Q4sPas_yhVSpPJhsYHH1i_dABK32hXWADbkXZf.p1LhtqwPsRxbhfqK2x3nfAd78cIQnxBg0cYvh1du2Iw + - mPAtf-FiQKo-mBLV3xrWIWuJyTHjzGSJmPY8IVhGW_HuCdZqOKwK-8M5yDOnlMpEA1Bb4b9aNawxg7WMRPf99F26VtOkyWmQx92jVLmtt8FAS1jGV1JwQWqOV1mHWEpA.05pef6wlWsOfSxYfM5-Pjfl1F0cJdA1-jlx3xeNUvmA pragma: - no-cache request-id: - - c99b0b8c-5e48-41d1-8bc5-02be0c507131 + - 31f94e77-9725-49ef-b536-1070aafd4226 strict-transport-security: - max-age=31536000; includeSubDomains x-aspnet-version: @@ -455,7 +455,7 @@ interactions: - --assignee-object-id --role --scope User-Agent: - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.24.0 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.25.0 accept-language: - en-US method: GET @@ -473,7 +473,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 01 Jun 2021 08:59:36 GMT + - Wed, 16 Jun 2021 03:31:26 GMT expires: - '-1' pragma: @@ -513,14 +513,14 @@ interactions: - --assignee-object-id --role --scope User-Agent: - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.24.0 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.25.0 accept-language: - en-US method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001?api-version=2020-04-01-preview response: body: - string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"09f10f07-08cf-4ab7-be0f-e9ae3d72b9ad","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002","condition":null,"conditionVersion":null,"createdOn":"2021-06-01T08:59:37.8026727Z","updatedOn":"2021-06-01T08:59:38.1777103Z","createdBy":null,"updatedBy":"21cd756e-e290-4a26-9547-93e8cc1a8923","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001","type":"Microsoft.Authorization/roleAssignments","name":"88888888-0000-0000-0000-000000000001"}' + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"09f10f07-08cf-4ab7-be0f-e9ae3d72b9ad","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002","condition":null,"conditionVersion":null,"createdOn":"2021-06-16T03:31:27.2539546Z","updatedOn":"2021-06-16T03:31:28.0939390Z","createdBy":null,"updatedBy":"21cd756e-e290-4a26-9547-93e8cc1a8923","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000001","type":"Microsoft.Authorization/roleAssignments","name":"88888888-0000-0000-0000-000000000001"}' headers: cache-control: - no-cache @@ -529,7 +529,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 01 Jun 2021 08:59:42 GMT + - Wed, 16 Jun 2021 03:31:32 GMT expires: - '-1' pragma: @@ -565,7 +565,7 @@ interactions: - --assignee-object-id --role --scope User-Agent: - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.24.0 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.25.0 accept-language: - en-US method: POST @@ -588,19 +588,19 @@ interactions: dataserviceversion: - 3.0; date: - - Tue, 01 Jun 2021 08:59:44 GMT + - Wed, 16 Jun 2021 03:31:32 GMT duration: - - '2480742' + - '2810223' expires: - '-1' ocp-aad-diagnostics-server-name: - - DqETTaqUTreHbk0szh3bcZ2YEgz8IAn6DGjrEmb+Htk= + - ogWzhH8PujQkdNFnPj+qcPhnvppFuF516dVPAutDfcg= ocp-aad-session-key: - - L3-ho_W-UdUVDiI_f6rVelwZvaj_7rdYK5OQ-T1xM97Tp-XxSw_PNochOeiEp76kZhVGUYS6M0or3ESChU8hj3Vv--EOIRwO2XhBAXj7-DoUIZHTJWOtYLvLmd6BMpJq.7xYemrbDAV4i0IZxNEM2om8k0bq1zcmvPICFVV_uYYE + - 0lqRS-YJjOBlnOXgU8sdT06zQC0QzD_CcP0QcD0Blm8PQzog2hpz7tVoWaxUsWsmlDitmnkqx-emWJ9lpt1NzuksB7raOxETsXjxtHh6mZV6gKnDmITZF-VNN0sjL2Xx.0VvEyl5crSqvXRIuHG6qv8uZrMQBrAUlbf8A83vdrNo pragma: - no-cache request-id: - - 310babc6-08ef-4204-9564-5271d7f6f97e + - 75523bdc-0cc1-49c0-bca2-46a1d0cab5c4 strict-transport-security: - max-age=31536000; includeSubDomains x-aspnet-version: @@ -629,7 +629,7 @@ interactions: - --assignee-object-id --role --scope User-Agent: - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.24.0 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.25.0 accept-language: - en-US method: GET @@ -647,7 +647,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 01 Jun 2021 08:59:44 GMT + - Wed, 16 Jun 2021 03:31:33 GMT expires: - '-1' pragma: @@ -687,14 +687,14 @@ interactions: - --assignee-object-id --role --scope User-Agent: - python/3.8.3 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.24.0 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.25.0 accept-language: - en-US method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000002?api-version=2020-04-01-preview response: body: - string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"09f10f07-08cf-4ab7-be0f-e9ae3d72b9ad","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003","condition":null,"conditionVersion":null,"createdOn":"2021-06-01T08:59:44.9844494Z","updatedOn":"2021-06-01T08:59:45.7944471Z","createdBy":null,"updatedBy":"21cd756e-e290-4a26-9547-93e8cc1a8923","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000002","type":"Microsoft.Authorization/roleAssignments","name":"88888888-0000-0000-0000-000000000002"}' + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"09f10f07-08cf-4ab7-be0f-e9ae3d72b9ad","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003","condition":null,"conditionVersion":null,"createdOn":"2021-06-16T03:31:33.9113901Z","updatedOn":"2021-06-16T03:31:34.7914031Z","createdBy":null,"updatedBy":"21cd756e-e290-4a26-9547-93e8cc1a8923","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003/providers/Microsoft.Authorization/roleAssignments/88888888-0000-0000-0000-000000000002","type":"Microsoft.Authorization/roleAssignments","name":"88888888-0000-0000-0000-000000000002"}' headers: cache-control: - no-cache @@ -703,7 +703,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 01 Jun 2021 08:59:50 GMT + - Wed, 16 Jun 2021 03:31:39 GMT expires: - '-1' pragma: @@ -738,16 +738,16 @@ interactions: ParameterSetName: - --name --resource-group --location User-Agent: - - AZURECLI/2.24.0 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004?api-version=2021-02-01 response: body: string: "{\r\n \"name\": \"vnet000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004\",\r\n - \ \"etag\": \"W/\\\"0302efc7-dc48-4884-97c8-7b991b16c6e5\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"0d75cbab-521f-4767-b30b-c2d11e9df127\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n - \ \"resourceGuid\": \"4cfb515a-450e-44b6-8d63-45ff749b6237\",\r\n \"addressSpace\": + \ \"resourceGuid\": \"9c00555f-38fd-46ea-91e3-a77bdece341b\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \ \"subnets\": [],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": @@ -756,7 +756,7 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7c77e994-87b9-41d4-aadb-9702a0599958?api-version=2021-02-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/9b96a6e6-546b-488d-98fd-e786117f8904?api-version=2021-02-01 cache-control: - no-cache content-length: @@ -764,7 +764,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 01 Jun 2021 08:59:59 GMT + - Wed, 16 Jun 2021 03:31:47 GMT expires: - '-1' pragma: @@ -777,7 +777,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - eeb4be06-889e-42a5-aac2-66fb2188315c + - 363fcfbf-ac3c-487d-a6ce-15e4c6ecaeca x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -797,9 +797,9 @@ interactions: ParameterSetName: - --name --resource-group --location User-Agent: - - AZURECLI/2.24.0 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7c77e994-87b9-41d4-aadb-9702a0599958?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/9b96a6e6-546b-488d-98fd-e786117f8904?api-version=2021-02-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -811,7 +811,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 01 Jun 2021 09:00:03 GMT + - Wed, 16 Jun 2021 03:31:51 GMT expires: - '-1' pragma: @@ -828,7 +828,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a931f5f0-c01e-4d03-ab4d-4d55a44b3882 + - a95c3a84-a20e-444f-9577-4c010ae7be26 status: code: 200 message: OK @@ -846,16 +846,16 @@ interactions: ParameterSetName: - --name --resource-group --location User-Agent: - - AZURECLI/2.24.0 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004?api-version=2021-02-01 response: body: string: "{\r\n \"name\": \"vnet000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004\",\r\n - \ \"etag\": \"W/\\\"39ba8031-02b5-40c5-81cd-c496262362ce\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"a23e3034-8e41-4eea-b4b2-90be6b3f4050\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"4cfb515a-450e-44b6-8d63-45ff749b6237\",\r\n \"addressSpace\": + \ \"resourceGuid\": \"9c00555f-38fd-46ea-91e3-a77bdece341b\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \ \"subnets\": [],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": @@ -868,9 +868,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 01 Jun 2021 09:00:03 GMT + - Wed, 16 Jun 2021 03:31:52 GMT etag: - - W/"39ba8031-02b5-40c5-81cd-c496262362ce" + - W/"a23e3034-8e41-4eea-b4b2-90be6b3f4050" expires: - '-1' pragma: @@ -887,7 +887,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b0332ae7-27cf-45f3-8cea-227095d0bb61 + - cd14fb5a-d51d-42f3-b7c1-649a99375b25 status: code: 200 message: OK @@ -905,16 +905,16 @@ interactions: ParameterSetName: - --name --vnet-name --resource-group --address-prefixes --delegations User-Agent: - - AZURECLI/2.24.0 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004?api-version=2021-02-01 response: body: string: "{\r\n \"name\": \"vnet000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004\",\r\n - \ \"etag\": \"W/\\\"39ba8031-02b5-40c5-81cd-c496262362ce\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"a23e3034-8e41-4eea-b4b2-90be6b3f4050\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"4cfb515a-450e-44b6-8d63-45ff749b6237\",\r\n \"addressSpace\": + \ \"resourceGuid\": \"9c00555f-38fd-46ea-91e3-a77bdece341b\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \ \"subnets\": [],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": @@ -927,9 +927,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 01 Jun 2021 09:00:04 GMT + - Wed, 16 Jun 2021 03:31:54 GMT etag: - - W/"39ba8031-02b5-40c5-81cd-c496262362ce" + - W/"a23e3034-8e41-4eea-b4b2-90be6b3f4050" expires: - '-1' pragma: @@ -946,7 +946,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ad509267-3f60-4e17-81d8-513ce00bb4ee + - 2aed7e27-fe2c-4fa7-bc97-9267f833ff0d status: code: 200 message: OK @@ -974,26 +974,26 @@ interactions: ParameterSetName: - --name --vnet-name --resource-group --address-prefixes --delegations User-Agent: - - AZURECLI/2.24.0 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004?api-version=2021-02-01 response: body: string: "{\r\n \"name\": \"vnet000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004\",\r\n - \ \"etag\": \"W/\\\"e682a02d-2d21-420e-8e18-07e5f7ebb664\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"676c2cd3-68a3-4fa3-ac0a-3bc89195d9c2\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n - \ \"resourceGuid\": \"4cfb515a-450e-44b6-8d63-45ff749b6237\",\r\n \"addressSpace\": + \ \"resourceGuid\": \"9c00555f-38fd-46ea-91e3-a77bdece341b\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \ \"subnets\": [\r\n {\r\n \"name\": \"subnet000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005\",\r\n - \ \"etag\": \"W/\\\"e682a02d-2d21-420e-8e18-07e5f7ebb664\\\"\",\r\n + \ \"etag\": \"W/\\\"676c2cd3-68a3-4fa3-ac0a-3bc89195d9c2\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [\r\n {\r\n \"name\": \"0\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005/delegations/0\",\r\n - \ \"etag\": \"W/\\\"e682a02d-2d21-420e-8e18-07e5f7ebb664\\\"\",\r\n + \ \"etag\": \"W/\\\"676c2cd3-68a3-4fa3-ac0a-3bc89195d9c2\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"serviceName\": \"Microsoft.StoragePool/diskPools\",\r\n \ \"actions\": [\r\n \"Microsoft.Network/virtualNetworks/read\"\r\n @@ -1005,7 +1005,7 @@ interactions: false\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/36cbc5cb-29ae-435a-a912-9854bc987b07?api-version=2021-02-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/cd99ea88-6b25-4d59-8b1b-1dd0dc6be659?api-version=2021-02-01 cache-control: - no-cache content-length: @@ -1013,7 +1013,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 01 Jun 2021 09:00:06 GMT + - Wed, 16 Jun 2021 03:31:55 GMT expires: - '-1' pragma: @@ -1030,7 +1030,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - c88b1c28-de99-43ef-9cfa-15f661733548 + - cfb52276-120b-4fdb-b678-6c7d1d5ae8a1 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -1050,9 +1050,9 @@ interactions: ParameterSetName: - --name --vnet-name --resource-group --address-prefixes --delegations User-Agent: - - AZURECLI/2.24.0 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/36cbc5cb-29ae-435a-a912-9854bc987b07?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/cd99ea88-6b25-4d59-8b1b-1dd0dc6be659?api-version=2021-02-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1064,7 +1064,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 01 Jun 2021 09:00:10 GMT + - Wed, 16 Jun 2021 03:31:58 GMT expires: - '-1' pragma: @@ -1081,7 +1081,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 62011316-252e-48ff-945a-b0d13a5cec7f + - 8437e71e-2966-482a-87cb-bdef6161fa91 status: code: 200 message: OK @@ -1099,26 +1099,26 @@ interactions: ParameterSetName: - --name --vnet-name --resource-group --address-prefixes --delegations User-Agent: - - AZURECLI/2.24.0 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004?api-version=2021-02-01 response: body: string: "{\r\n \"name\": \"vnet000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004\",\r\n - \ \"etag\": \"W/\\\"dd613d95-d8fd-41dc-9719-825543b96525\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"5490f5a3-66b7-4fba-b6e5-408d26f3f36f\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"4cfb515a-450e-44b6-8d63-45ff749b6237\",\r\n \"addressSpace\": + \ \"resourceGuid\": \"9c00555f-38fd-46ea-91e3-a77bdece341b\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \ \"subnets\": [\r\n {\r\n \"name\": \"subnet000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005\",\r\n - \ \"etag\": \"W/\\\"dd613d95-d8fd-41dc-9719-825543b96525\\\"\",\r\n + \ \"etag\": \"W/\\\"5490f5a3-66b7-4fba-b6e5-408d26f3f36f\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [\r\n {\r\n \"name\": \"0\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005/delegations/0\",\r\n - \ \"etag\": \"W/\\\"dd613d95-d8fd-41dc-9719-825543b96525\\\"\",\r\n + \ \"etag\": \"W/\\\"5490f5a3-66b7-4fba-b6e5-408d26f3f36f\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"serviceName\": \"Microsoft.StoragePool/diskPools\",\r\n \ \"actions\": [\r\n \"Microsoft.Network/virtualNetworks/read\"\r\n @@ -1136,9 +1136,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 01 Jun 2021 09:00:10 GMT + - Wed, 16 Jun 2021 03:31:59 GMT etag: - - W/"dd613d95-d8fd-41dc-9719-825543b96525" + - W/"5490f5a3-66b7-4fba-b6e5-408d26f3f36f" expires: - '-1' pragma: @@ -1155,7 +1155,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 66b5a4c6-0223-45b9-adcc-f332a36a6538 + - b665d639-cba2-44c3-8b5e-bf734e4845aa status: code: 200 message: OK @@ -1180,15 +1180,15 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-01T09:02:04.8070554Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-01T09:02:04.8070554Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Pending","status":"Unknown"},"sku":{"name":"Standard","tier":"Standard"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-16T03:32:03.9430937Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T03:32:03.9430937Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Pending","status":"Unknown"},"sku":{"name":"Standard","tier":"Standard"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview cache-control: - no-cache content-length: @@ -1196,7 +1196,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:02:08 GMT + - Wed, 16 Jun 2021 03:32:08 GMT expires: - '-1' pragma: @@ -1229,12 +1229,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -1243,7 +1243,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:02:18 GMT + - Wed, 16 Jun 2021 03:32:18 GMT expires: - '-1' pragma: @@ -1276,12 +1276,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -1290,7 +1290,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:02:48 GMT + - Wed, 16 Jun 2021 03:32:48 GMT expires: - '-1' pragma: @@ -1323,12 +1323,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -1337,7 +1337,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:03:19 GMT + - Wed, 16 Jun 2021 03:33:19 GMT expires: - '-1' pragma: @@ -1370,12 +1370,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -1384,7 +1384,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:03:49 GMT + - Wed, 16 Jun 2021 03:33:49 GMT expires: - '-1' pragma: @@ -1417,12 +1417,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -1431,7 +1431,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:04:19 GMT + - Wed, 16 Jun 2021 03:34:20 GMT expires: - '-1' pragma: @@ -1464,12 +1464,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -1478,7 +1478,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:04:51 GMT + - Wed, 16 Jun 2021 03:34:51 GMT expires: - '-1' pragma: @@ -1511,12 +1511,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -1525,7 +1525,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:05:21 GMT + - Wed, 16 Jun 2021 03:35:21 GMT expires: - '-1' pragma: @@ -1558,12 +1558,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -1572,7 +1572,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:05:51 GMT + - Wed, 16 Jun 2021 03:35:52 GMT expires: - '-1' pragma: @@ -1605,12 +1605,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -1619,7 +1619,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:06:22 GMT + - Wed, 16 Jun 2021 03:36:22 GMT expires: - '-1' pragma: @@ -1652,12 +1652,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -1666,7 +1666,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:06:53 GMT + - Wed, 16 Jun 2021 03:36:53 GMT expires: - '-1' pragma: @@ -1699,12 +1699,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -1713,7 +1713,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:07:23 GMT + - Wed, 16 Jun 2021 03:37:24 GMT expires: - '-1' pragma: @@ -1746,12 +1746,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -1760,7 +1760,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:07:54 GMT + - Wed, 16 Jun 2021 03:37:54 GMT expires: - '-1' pragma: @@ -1793,12 +1793,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -1807,7 +1807,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:08:25 GMT + - Wed, 16 Jun 2021 03:38:24 GMT expires: - '-1' pragma: @@ -1840,12 +1840,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -1854,7 +1854,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:08:55 GMT + - Wed, 16 Jun 2021 03:38:55 GMT expires: - '-1' pragma: @@ -1887,12 +1887,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -1901,7 +1901,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:09:25 GMT + - Wed, 16 Jun 2021 03:39:26 GMT expires: - '-1' pragma: @@ -1934,12 +1934,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -1948,7 +1948,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:09:56 GMT + - Wed, 16 Jun 2021 03:39:56 GMT expires: - '-1' pragma: @@ -1981,12 +1981,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -1995,7 +1995,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:10:26 GMT + - Wed, 16 Jun 2021 03:40:26 GMT expires: - '-1' pragma: @@ -2028,12 +2028,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -2042,7 +2042,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:10:56 GMT + - Wed, 16 Jun 2021 03:40:57 GMT expires: - '-1' pragma: @@ -2075,12 +2075,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -2089,7 +2089,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:11:28 GMT + - Wed, 16 Jun 2021 03:41:28 GMT expires: - '-1' pragma: @@ -2122,12 +2122,12 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Running","startTime":"2021-06-01T09:02:07Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -2136,7 +2136,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:11:59 GMT + - Wed, 16 Jun 2021 03:41:58 GMT expires: - '-1' pragma: @@ -2169,21 +2169,21 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9ae6ff31-afa7-4e9f-acd5-f408ec222a27","name":"9ae6ff31-afa7-4e9f-acd5-f408ec222a27","status":"Succeeded","startTime":"2021-06-01T09:02:07Z","endTime":"2021-06-01T09:12:04Z","properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-01T09:02:04.8070554Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-01T09:02:04.8070554Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Running"},"sku":{"name":"Standard","tier":"Standard"}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '1208' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:12:31 GMT + - Wed, 16 Jun 2021 03:42:29 GMT expires: - '-1' pragma: @@ -2216,21 +2216,21 @@ interactions: - --name --resource-group --location --availability-zones --subnet-id --sku --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-01T09:02:04.8070554Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-01T09:02:04.8070554Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Running"},"sku":{"name":"Standard","tier":"Standard"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '929' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:12:31 GMT + - Wed, 16 Jun 2021 03:42:59 GMT expires: - '-1' pragma: @@ -2252,31 +2252,32 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - - disk-pool show + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-01T09:02:04.8070554Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-01T09:02:04.8070554Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Running"},"sku":{"name":"Standard","tier":"Standard"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '929' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:12:33 GMT + - Wed, 16 Jun 2021 03:43:30 GMT expires: - '-1' pragma: @@ -2298,31 +2299,32 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - - disk-pool list + - disk-pool create Connection: - keep-alive ParameterSetName: - - --resource-group + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-01T09:02:04.8070554Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-01T09:02:04.8070554Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Running"},"sku":{"name":"Standard","tier":"Standard"}}],"nextLink":null}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '957' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:12:35 GMT + - Wed, 16 Jun 2021 03:44:01 GMT expires: - '-1' pragma: @@ -2341,58 +2343,52 @@ interactions: code: 200 message: OK - request: - body: '{"properties": {"aclMode": "Dynamic", "luns": [{"name": "lun0", "managedDiskAzureResourceId": - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"}]}}' + body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target create + - disk-pool create Connection: - keep-alive - Content-Length: - - '228' - Content-Type: - - application/json ParameterSetName: - - --name --disk-pool-name --resource-group --acl-mode --luns + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007?api-version=2021-04-01-preview + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007","name":"iscsi000007","type":"Microsoft.StoragePool/diskPools/iscsiTargets","systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-01T09:12:36.0392232Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-01T09:12:36.0392232Z"},"properties":{"targetIqn":"iqn.2021-06.com.microsoft:iscsi000007","aclMode":"Dynamic","luns":[{"managedDiskAzureResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002","name":"lun0","lun":0}],"endpoints":["10.0.0.5:3260","10.0.0.4:3260"],"provisioningState":"Pending","status":"Unknown"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/925e3cbd-817b-488a-8318-5c74a2173d86?api-version=2021-04-01-preview cache-control: - no-cache content-length: - - '849' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:12:36 GMT + - Wed, 16 Jun 2021 03:44:31 GMT expires: - '-1' pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff - x-ms-async-operation-timeout: - - PT1H - x-ms-ratelimit-remaining-subscription-writes: - - '1198' x-ms-return-client-request-id: - 'true' status: - code: 201 - message: Created + code: 200 + message: OK - request: body: null headers: @@ -2401,27 +2397,28 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target create + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --disk-pool-name --resource-group --acl-mode --luns + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/925e3cbd-817b-488a-8318-5c74a2173d86?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/925e3cbd-817b-488a-8318-5c74a2173d86","name":"925e3cbd-817b-488a-8318-5c74a2173d86","status":"Running","startTime":"2021-06-01T09:12:37Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '230' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:12:47 GMT + - Wed, 16 Jun 2021 03:45:02 GMT expires: - '-1' pragma: @@ -2447,27 +2444,28 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target create + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --disk-pool-name --resource-group --acl-mode --luns + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/925e3cbd-817b-488a-8318-5c74a2173d86?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/925e3cbd-817b-488a-8318-5c74a2173d86","name":"925e3cbd-817b-488a-8318-5c74a2173d86","status":"Running","startTime":"2021-06-01T09:12:37Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '230' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:13:17 GMT + - Wed, 16 Jun 2021 03:45:33 GMT expires: - '-1' pragma: @@ -2493,27 +2491,28 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target create + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --disk-pool-name --resource-group --acl-mode --luns + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/925e3cbd-817b-488a-8318-5c74a2173d86?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/925e3cbd-817b-488a-8318-5c74a2173d86","name":"925e3cbd-817b-488a-8318-5c74a2173d86","status":"Running","startTime":"2021-06-01T09:12:37Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '230' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:13:48 GMT + - Wed, 16 Jun 2021 03:46:03 GMT expires: - '-1' pragma: @@ -2539,27 +2538,28 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target create + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --disk-pool-name --resource-group --acl-mode --luns + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/925e3cbd-817b-488a-8318-5c74a2173d86?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/925e3cbd-817b-488a-8318-5c74a2173d86","name":"925e3cbd-817b-488a-8318-5c74a2173d86","status":"Succeeded","startTime":"2021-06-01T09:12:37Z","endTime":"2021-06-01T09:14:13Z","properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007","name":"iscsi000007","type":"Microsoft.StoragePool/diskPools/iscsiTargets","systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-01T09:12:36.0392232Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-01T09:12:36.0392232Z"},"properties":{"targetIqn":"iqn.2021-06.com.microsoft:iscsi000007","aclMode":"Dynamic","luns":[{"managedDiskAzureResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002","name":"lun0","lun":0}],"endpoints":["10.0.0.5:3260","10.0.0.4:3260"],"provisioningState":"Succeeded","status":"Healthy"}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '1130' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:14:18 GMT + - Wed, 16 Jun 2021 03:46:34 GMT expires: - '-1' pragma: @@ -2585,27 +2585,28 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target create + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --disk-pool-name --resource-group --acl-mode --luns + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007","name":"iscsi000007","type":"Microsoft.StoragePool/diskPools/iscsiTargets","systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-01T09:12:36.0392232Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-01T09:12:36.0392232Z"},"properties":{"targetIqn":"iqn.2021-06.com.microsoft:iscsi000007","aclMode":"Dynamic","luns":[{"managedDiskAzureResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002","name":"lun0","lun":0}],"endpoints":["10.0.0.5:3260","10.0.0.4:3260"],"provisioningState":"Succeeded","status":"Healthy"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '851' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:14:19 GMT + - Wed, 16 Jun 2021 03:47:05 GMT expires: - '-1' pragma: @@ -2627,31 +2628,32 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target show + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --disk-pool-name --resource-group + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007","name":"iscsi000007","type":"Microsoft.StoragePool/diskPools/iscsiTargets","systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-01T09:12:36.0392232Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-01T09:12:36.0392232Z"},"properties":{"targetIqn":"iqn.2021-06.com.microsoft:iscsi000007","aclMode":"Dynamic","luns":[{"managedDiskAzureResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002","name":"lun0","lun":0}],"endpoints":["10.0.0.5:3260","10.0.0.4:3260"],"provisioningState":"Succeeded","status":"Healthy"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '851' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:14:21 GMT + - Wed, 16 Jun 2021 03:47:35 GMT expires: - '-1' pragma: @@ -2673,31 +2675,32 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target list + - disk-pool create Connection: - keep-alive ParameterSetName: - - --disk-pool-name --resource-group + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007","name":"iscsi000007","type":"Microsoft.StoragePool/diskPools/iscsiTargets","systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-01T09:12:36.0392232Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-01T09:12:36.0392232Z"},"properties":{"targetIqn":"iqn.2021-06.com.microsoft:iscsi000007","aclMode":"Dynamic","luns":[{"managedDiskAzureResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002","name":"lun0","lun":0}],"endpoints":["10.0.0.5:3260","10.0.0.4:3260"],"provisioningState":"Succeeded","status":"Healthy"}}],"nextLink":null}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '879' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:14:22 GMT + - Wed, 16 Jun 2021 03:48:05 GMT expires: - '-1' pragma: @@ -2716,58 +2719,52 @@ interactions: code: 200 message: OK - request: - body: '{"properties": {"disks": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"}, - {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003"}]}}' + body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - - disk-pool update + - disk-pool create Connection: - keep-alive - Content-Length: - - '307' - Content-Type: - - application/json ParameterSetName: - - --name --resource-group --disks + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006?api-version=2021-04-01-preview + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/0c8854c3-7e54-4b5d-b062-986c10050662?api-version=2021-04-01-preview cache-control: - no-cache content-length: - - '0' + - '243' + content-type: + - application/json date: - - Tue, 01 Jun 2021 09:21:51 GMT + - Wed, 16 Jun 2021 03:48:36 GMT expires: - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationresults/0c8854c3-7e54-4b5d-b062-986c10050662?api-version=2021-04-01-preview pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff - x-ms-async-operation-timeout: - - PT1H - x-ms-ratelimit-remaining-subscription-writes: - - '1199' x-ms-return-client-request-id: - 'true' status: - code: 202 - message: Accepted + code: 200 + message: OK - request: body: null headers: @@ -2776,18 +2773,19 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool update + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --resource-group --disks + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/0c8854c3-7e54-4b5d-b062-986c10050662?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/0c8854c3-7e54-4b5d-b062-986c10050662","name":"0c8854c3-7e54-4b5d-b062-986c10050662","status":"Running","startTime":"2021-06-01T09:21:52Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -2796,7 +2794,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:22:02 GMT + - Wed, 16 Jun 2021 03:49:07 GMT expires: - '-1' pragma: @@ -2822,18 +2820,19 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool update + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --resource-group --disks + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/0c8854c3-7e54-4b5d-b062-986c10050662?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/0c8854c3-7e54-4b5d-b062-986c10050662","name":"0c8854c3-7e54-4b5d-b062-986c10050662","status":"Running","startTime":"2021-06-01T09:21:52Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -2842,7 +2841,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:22:32 GMT + - Wed, 16 Jun 2021 03:49:37 GMT expires: - '-1' pragma: @@ -2868,18 +2867,19 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool update + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --resource-group --disks + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/0c8854c3-7e54-4b5d-b062-986c10050662?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/0c8854c3-7e54-4b5d-b062-986c10050662","name":"0c8854c3-7e54-4b5d-b062-986c10050662","status":"Running","startTime":"2021-06-01T09:21:52Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -2888,7 +2888,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:23:02 GMT + - Wed, 16 Jun 2021 03:50:07 GMT expires: - '-1' pragma: @@ -2914,18 +2914,19 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool update + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --resource-group --disks + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/0c8854c3-7e54-4b5d-b062-986c10050662?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/0c8854c3-7e54-4b5d-b062-986c10050662","name":"0c8854c3-7e54-4b5d-b062-986c10050662","status":"Running","startTime":"2021-06-01T09:21:52Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -2934,7 +2935,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:23:33 GMT + - Wed, 16 Jun 2021 03:50:38 GMT expires: - '-1' pragma: @@ -2960,18 +2961,19 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool update + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --resource-group --disks + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/0c8854c3-7e54-4b5d-b062-986c10050662?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/0c8854c3-7e54-4b5d-b062-986c10050662","name":"0c8854c3-7e54-4b5d-b062-986c10050662","status":"Running","startTime":"2021-06-01T09:21:52Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -2980,7 +2982,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:24:04 GMT + - Wed, 16 Jun 2021 03:51:09 GMT expires: - '-1' pragma: @@ -3006,18 +3008,19 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool update + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --resource-group --disks + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/0c8854c3-7e54-4b5d-b062-986c10050662?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/0c8854c3-7e54-4b5d-b062-986c10050662","name":"0c8854c3-7e54-4b5d-b062-986c10050662","status":"Running","startTime":"2021-06-01T09:21:52Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -3026,7 +3029,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:24:35 GMT + - Wed, 16 Jun 2021 03:51:39 GMT expires: - '-1' pragma: @@ -3052,18 +3055,19 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool update + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --resource-group --disks + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/0c8854c3-7e54-4b5d-b062-986c10050662?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/0c8854c3-7e54-4b5d-b062-986c10050662","name":"0c8854c3-7e54-4b5d-b062-986c10050662","status":"Running","startTime":"2021-06-01T09:21:52Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache @@ -3072,7 +3076,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:25:05 GMT + - Wed, 16 Jun 2021 03:52:10 GMT expires: - '-1' pragma: @@ -3098,27 +3102,28 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool update + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --resource-group --disks + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/0c8854c3-7e54-4b5d-b062-986c10050662?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/0c8854c3-7e54-4b5d-b062-986c10050662","name":"0c8854c3-7e54-4b5d-b062-986c10050662","status":"Succeeded","startTime":"2021-06-01T09:21:52Z","endTime":"2021-06-01T09:25:28Z","properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-01T09:02:04.8070554Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-01T09:21:50.5834578Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Running"},"sku":{"name":"Standard","tier":"Standard"}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '1346' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:25:35 GMT + - Wed, 16 Jun 2021 03:52:41 GMT expires: - '-1' pragma: @@ -3144,27 +3149,28 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool update + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --resource-group --disks + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-01T09:02:04.8070554Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-01T09:21:50.5834578Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Running"},"sku":{"name":"Standard","tier":"Standard"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '1067' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:25:36 GMT + - Wed, 16 Jun 2021 03:53:12 GMT expires: - '-1' pragma: @@ -3183,59 +3189,52 @@ interactions: code: 200 message: OK - request: - body: '{"properties": {"luns": [{"name": "lun0", "managedDiskAzureResourceId": - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"}, - {"name": "lun1", "managedDiskAzureResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003"}]}}' + body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target update + - disk-pool create Connection: - keep-alive - Content-Length: - - '386' - Content-Type: - - application/json ParameterSetName: - - --name --disk-pool-name --resource-group --luns --luns + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007?api-version=2021-04-01-preview + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/fc8ed4c9-05b5-4c79-8e85-68cdcb20e47e?api-version=2021-04-01-preview cache-control: - no-cache content-length: - - '0' + - '243' + content-type: + - application/json date: - - Tue, 01 Jun 2021 09:25:38 GMT + - Wed, 16 Jun 2021 03:53:42 GMT expires: - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationresults/fc8ed4c9-05b5-4c79-8e85-68cdcb20e47e?api-version=2021-04-01-preview pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff - x-ms-async-operation-timeout: - - PT1H - x-ms-ratelimit-remaining-subscription-writes: - - '1198' x-ms-return-client-request-id: - 'true' status: - code: 202 - message: Accepted + code: 200 + message: OK - request: body: null headers: @@ -3244,27 +3243,28 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target update + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --disk-pool-name --resource-group --luns --luns + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/fc8ed4c9-05b5-4c79-8e85-68cdcb20e47e?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/fc8ed4c9-05b5-4c79-8e85-68cdcb20e47e","name":"fc8ed4c9-05b5-4c79-8e85-68cdcb20e47e","status":"Running","startTime":"2021-06-01T09:25:38Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '230' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:25:49 GMT + - Wed, 16 Jun 2021 03:54:12 GMT expires: - '-1' pragma: @@ -3290,27 +3290,28 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target update + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --disk-pool-name --resource-group --luns --luns + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/fc8ed4c9-05b5-4c79-8e85-68cdcb20e47e?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/fc8ed4c9-05b5-4c79-8e85-68cdcb20e47e","name":"fc8ed4c9-05b5-4c79-8e85-68cdcb20e47e","status":"Running","startTime":"2021-06-01T09:25:38Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '230' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:26:19 GMT + - Wed, 16 Jun 2021 03:54:44 GMT expires: - '-1' pragma: @@ -3336,44 +3337,615 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target update + - disk-pool create Connection: - keep-alive ParameterSetName: - - --name --disk-pool-name --resource-group --luns --luns + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks + User-Agent: + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' + headers: + cache-control: + - no-cache + content-length: + - '243' + content-type: + - application/json + date: + - Wed, 16 Jun 2021 03:55:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-return-client-request-id: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-pool create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks + User-Agent: + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' + headers: + cache-control: + - no-cache + content-length: + - '243' + content-type: + - application/json + date: + - Wed, 16 Jun 2021 03:55:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-return-client-request-id: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-pool create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks + User-Agent: + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' + headers: + cache-control: + - no-cache + content-length: + - '243' + content-type: + - application/json + date: + - Wed, 16 Jun 2021 03:56:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-return-client-request-id: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-pool create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks + User-Agent: + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' + headers: + cache-control: + - no-cache + content-length: + - '243' + content-type: + - application/json + date: + - Wed, 16 Jun 2021 03:56:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-return-client-request-id: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-pool create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks + User-Agent: + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' + headers: + cache-control: + - no-cache + content-length: + - '243' + content-type: + - application/json + date: + - Wed, 16 Jun 2021 03:57:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-return-client-request-id: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-pool create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks + User-Agent: + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' + headers: + cache-control: + - no-cache + content-length: + - '243' + content-type: + - application/json + date: + - Wed, 16 Jun 2021 03:57:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-return-client-request-id: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-pool create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks + User-Agent: + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Running","startTime":"2021-06-16T03:32:06Z","endTime":""}' + headers: + cache-control: + - no-cache + content-length: + - '243' + content-type: + - application/json + date: + - Wed, 16 Jun 2021 03:58:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-return-client-request-id: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-pool create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks + User-Agent: + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/8e81a7aa-0639-4b65-9342-40464c550ea7?api-version=2021-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/8e81a7aa-0639-4b65-9342-40464c550ea7","name":"8e81a7aa-0639-4b65-9342-40464c550ea7","status":"Succeeded","startTime":"2021-06-16T03:32:06Z","endTime":"2021-06-16T03:58:21Z","properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-16T03:32:03.9430937Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T03:32:03.9430937Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Running"},"sku":{"name":"Standard","tier":"Standard"}}}' + headers: + cache-control: + - no-cache + content-length: + - '1208' + content-type: + - application/json + date: + - Wed, 16 Jun 2021 03:58:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-return-client-request-id: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-pool create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --location --availability-zones --subnet-id --sku + --disks + User-Agent: + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006?api-version=2021-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-16T03:32:03.9430937Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T03:32:03.9430937Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Running"},"sku":{"name":"Standard","tier":"Standard"}}' + headers: + cache-control: + - no-cache + content-length: + - '929' + content-type: + - application/json + date: + - Wed, 16 Jun 2021 03:58:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-return-client-request-id: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-pool show + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group + User-Agent: + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006?api-version=2021-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-16T03:32:03.9430937Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T03:32:03.9430937Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Running"},"sku":{"name":"Standard","tier":"Standard"}}' + headers: + cache-control: + - no-cache + content-length: + - '929' + content-type: + - application/json + date: + - Wed, 16 Jun 2021 04:50:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-return-client-request-id: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-pool list + Connection: + - keep-alive + ParameterSetName: + - --resource-group + User-Agent: + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools?api-version=2021-04-01-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-16T03:32:03.9430937Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T03:32:03.9430937Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Running"},"sku":{"name":"Standard","tier":"Standard"}}],"nextLink":null}' + headers: + cache-control: + - no-cache + content-length: + - '957' + content-type: + - application/json + date: + - Wed, 16 Jun 2021 04:50:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-return-client-request-id: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-pool list-outbound-network-dependency-endpoint + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group + User-Agent: + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/outboundNetworkDependenciesEndpoints?api-version=2021-04-01-preview + response: + body: + string: '{"value":[{"category":"Microsoft Event Hub","endpoints":[{"domainName":"evhns-rp-prod-eus.servicebus.windows.net","endpointDetails":[{"port":443}]}]},{"category":"Microsoft + Service Bus","endpoints":[{"domainName":"sb-rp-prod-eus.servicebus.windows.net","endpointDetails":[{"port":443}]}]},{"category":"Microsoft + Storage","endpoints":[{"domainName":"strpprodeastus.blob.core.windows.net","endpointDetails":[{"port":443}]},{"domainName":"stbsprodeeastus.blob.core.windows.net","endpointDetails":[{"port":443}]}]},{"category":"Microsoft + Apt Mirror","endpoints":[{"domainName":"azure.archive.ubuntu.com","endpointDetails":[{"port":443}]}]}]}' + headers: + cache-control: + - no-cache + content-length: + - '637' + content-type: + - application/json + date: + - Wed, 16 Jun 2021 04:50:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-return-client-request-id: + - 'true' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"aclMode": "Dynamic", "luns": [{"name": "lun0", "managedDiskAzureResourceId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-pool iscsi-target create + Connection: + - keep-alive + Content-Length: + - '228' + Content-Type: + - application/json + ParameterSetName: + - --name --disk-pool-name --resource-group --acl-mode --luns User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/fc8ed4c9-05b5-4c79-8e85-68cdcb20e47e?api-version=2021-04-01-preview + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/fc8ed4c9-05b5-4c79-8e85-68cdcb20e47e","name":"fc8ed4c9-05b5-4c79-8e85-68cdcb20e47e","status":"Running","startTime":"2021-06-01T09:25:38Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007","name":"iscsi000007","type":"Microsoft.StoragePool/diskPools/iscsiTargets","systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-16T04:50:27.1571342Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T04:50:27.1571342Z"},"properties":{"targetIqn":"iqn.2021-06.com.microsoft:iscsi000007","aclMode":"Dynamic","luns":[{"managedDiskAzureResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002","name":"lun0","lun":0}],"endpoints":["10.0.0.5:3260","10.0.0.4:3260"],"provisioningState":"Pending","status":"Unknown"}}' headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/72fbed46-0eb4-4e29-b533-8d607d1c1a87?api-version=2021-04-01-preview cache-control: - no-cache content-length: - - '230' + - '849' content-type: - application/json date: - - Tue, 01 Jun 2021 09:26:50 GMT + - Wed, 16 Jun 2021 04:50:27 GMT expires: - '-1' pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff + x-ms-async-operation-timeout: + - PT1H + x-ms-ratelimit-remaining-subscription-writes: + - '1199' x-ms-return-client-request-id: - 'true' status: - code: 200 - message: OK + code: 201 + message: Created - request: body: null headers: @@ -3382,27 +3954,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target update + - disk-pool iscsi-target create Connection: - keep-alive ParameterSetName: - - --name --disk-pool-name --resource-group --luns --luns + - --name --disk-pool-name --resource-group --acl-mode --luns User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/fc8ed4c9-05b5-4c79-8e85-68cdcb20e47e?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/72fbed46-0eb4-4e29-b533-8d607d1c1a87?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/fc8ed4c9-05b5-4c79-8e85-68cdcb20e47e","name":"fc8ed4c9-05b5-4c79-8e85-68cdcb20e47e","status":"Succeeded","startTime":"2021-06-01T09:25:38Z","endTime":"2021-06-01T09:27:13Z","properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007","name":"iscsi000007","type":"Microsoft.StoragePool/diskPools/iscsiTargets","systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-01T09:12:36.0392232Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-01T09:25:37.7054006Z"},"properties":{"targetIqn":"iqn.2021-06.com.microsoft:iscsi000007","aclMode":"Dynamic","luns":[{"managedDiskAzureResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002","name":"lun0","lun":0},{"managedDiskAzureResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003","name":"lun1","lun":1}],"endpoints":["10.0.0.5:3260","10.0.0.4:3260"],"provisioningState":"Succeeded","status":"Healthy"}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/72fbed46-0eb4-4e29-b533-8d607d1c1a87","name":"72fbed46-0eb4-4e29-b533-8d607d1c1a87","status":"Running","startTime":"2021-06-16T04:50:27Z"}' headers: cache-control: - no-cache content-length: - - '1314' + - '230' content-type: - application/json date: - - Tue, 01 Jun 2021 09:27:20 GMT + - Wed, 16 Jun 2021 04:50:37 GMT expires: - '-1' pragma: @@ -3428,27 +4000,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target update + - disk-pool iscsi-target create Connection: - keep-alive ParameterSetName: - - --name --disk-pool-name --resource-group --luns --luns + - --name --disk-pool-name --resource-group --acl-mode --luns User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/72fbed46-0eb4-4e29-b533-8d607d1c1a87?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007","name":"iscsi000007","type":"Microsoft.StoragePool/diskPools/iscsiTargets","systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-01T09:12:36.0392232Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-01T09:25:37.7054006Z"},"properties":{"targetIqn":"iqn.2021-06.com.microsoft:iscsi000007","aclMode":"Dynamic","luns":[{"managedDiskAzureResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002","name":"lun0","lun":0},{"managedDiskAzureResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003","name":"lun1","lun":1}],"endpoints":["10.0.0.5:3260","10.0.0.4:3260"],"provisioningState":"Succeeded","status":"Healthy"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/72fbed46-0eb4-4e29-b533-8d607d1c1a87","name":"72fbed46-0eb4-4e29-b533-8d607d1c1a87","status":"Running","startTime":"2021-06-16T04:50:27Z"}' headers: cache-control: - no-cache content-length: - - '1035' + - '230' content-type: - application/json date: - - Tue, 01 Jun 2021 09:27:20 GMT + - Wed, 16 Jun 2021 04:51:08 GMT expires: - '-1' pragma: @@ -3470,50 +4042,48 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool iscsi-target create Connection: - keep-alive - Content-Length: - - '0' ParameterSetName: - - --name --resource-group + - --name --disk-pool-name --resource-group --acl-mode --luns User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/deallocate?api-version=2021-04-01-preview + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/72fbed46-0eb4-4e29-b533-8d607d1c1a87?api-version=2021-04-01-preview response: body: - string: '' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/72fbed46-0eb4-4e29-b533-8d607d1c1a87","name":"72fbed46-0eb4-4e29-b533-8d607d1c1a87","status":"Running","startTime":"2021-06-16T04:50:27Z"}' headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview cache-control: - no-cache content-length: - - '0' + - '230' + content-type: + - application/json date: - - Tue, 01 Jun 2021 09:27:23 GMT + - Wed, 16 Jun 2021 04:51:38 GMT expires: - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationresults/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' x-ms-return-client-request-id: - 'true' status: - code: 202 - message: Accepted + code: 200 + message: OK - request: body: null headers: @@ -3522,27 +4092,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool iscsi-target create Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --disk-pool-name --resource-group --acl-mode --luns User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/72fbed46-0eb4-4e29-b533-8d607d1c1a87?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/72fbed46-0eb4-4e29-b533-8d607d1c1a87","name":"72fbed46-0eb4-4e29-b533-8d607d1c1a87","status":"Succeeded","startTime":"2021-06-16T04:50:27Z","endTime":"2021-06-16T04:52:04Z","properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007","name":"iscsi000007","type":"Microsoft.StoragePool/diskPools/iscsiTargets","systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-16T04:50:27.1571342Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T04:50:27.1571342Z"},"properties":{"targetIqn":"iqn.2021-06.com.microsoft:iscsi000007","aclMode":"Dynamic","luns":[{"managedDiskAzureResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002","name":"lun0","lun":0}],"endpoints":["10.0.0.5:3260","10.0.0.4:3260"],"provisioningState":"Succeeded","status":"Healthy"}}}' headers: cache-control: - no-cache content-length: - - '243' + - '1130' content-type: - application/json date: - - Tue, 01 Jun 2021 09:27:33 GMT + - Wed, 16 Jun 2021 04:52:10 GMT expires: - '-1' pragma: @@ -3568,27 +4138,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool iscsi-target create Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --disk-pool-name --resource-group --acl-mode --luns User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007","name":"iscsi000007","type":"Microsoft.StoragePool/diskPools/iscsiTargets","systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-16T04:50:27.1571342Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T04:50:27.1571342Z"},"properties":{"targetIqn":"iqn.2021-06.com.microsoft:iscsi000007","aclMode":"Dynamic","luns":[{"managedDiskAzureResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002","name":"lun0","lun":0}],"endpoints":["10.0.0.5:3260","10.0.0.4:3260"],"provisioningState":"Succeeded","status":"Healthy"}}' headers: cache-control: - no-cache content-length: - - '243' + - '851' content-type: - application/json date: - - Tue, 01 Jun 2021 09:28:04 GMT + - Wed, 16 Jun 2021 04:52:10 GMT expires: - '-1' pragma: @@ -3610,31 +4180,31 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool iscsi-target show Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --disk-pool-name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007","name":"iscsi000007","type":"Microsoft.StoragePool/diskPools/iscsiTargets","systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-16T04:50:27.1571342Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T04:50:27.1571342Z"},"properties":{"targetIqn":"iqn.2021-06.com.microsoft:iscsi000007","aclMode":"Dynamic","luns":[{"managedDiskAzureResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002","name":"lun0","lun":0}],"endpoints":["10.0.0.5:3260","10.0.0.4:3260"],"provisioningState":"Succeeded","status":"Healthy"}}' headers: cache-control: - no-cache content-length: - - '243' + - '851' content-type: - application/json date: - - Tue, 01 Jun 2021 09:28:34 GMT + - Wed, 16 Jun 2021 06:26:57 GMT expires: - '-1' pragma: @@ -3656,31 +4226,31 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool iscsi-target list Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --disk-pool-name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007","name":"iscsi000007","type":"Microsoft.StoragePool/diskPools/iscsiTargets","systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-16T04:50:27.1571342Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T04:50:27.1571342Z"},"properties":{"targetIqn":"iqn.2021-06.com.microsoft:iscsi000007","aclMode":"Dynamic","luns":[{"managedDiskAzureResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002","name":"lun0","lun":0}],"endpoints":["10.0.0.5:3260","10.0.0.4:3260"],"provisioningState":"Succeeded","status":"Healthy"}}],"nextLink":null}' headers: cache-control: - no-cache content-length: - - '243' + - '879' content-type: - application/json date: - - Tue, 01 Jun 2021 09:29:05 GMT + - Wed, 16 Jun 2021 06:27:00 GMT expires: - '-1' pragma: @@ -3698,6 +4268,59 @@ interactions: status: code: 200 message: OK +- request: + body: '{"properties": {"disks": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"}, + {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003"}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-pool update + Connection: + - keep-alive + Content-Length: + - '307' + Content-Type: + - application/json + ParameterSetName: + - --name --resource-group --disks + User-Agent: + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006?api-version=2021-04-01-preview + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/09693714-9411-4fec-bc88-43ea10b9c57e?api-version=2021-04-01-preview + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 16 Jun 2021 06:27:16 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationresults/09693714-9411-4fec-bc88-43ea10b9c57e?api-version=2021-04-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-async-operation-timeout: + - PT1H + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-ms-return-client-request-id: + - 'true' + status: + code: 202 + message: Accepted - request: body: null headers: @@ -3706,18 +4329,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool update Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --resource-group --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/09693714-9411-4fec-bc88-43ea10b9c57e?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/09693714-9411-4fec-bc88-43ea10b9c57e","name":"09693714-9411-4fec-bc88-43ea10b9c57e","status":"Running","startTime":"2021-06-16T06:27:17Z","endTime":""}' headers: cache-control: - no-cache @@ -3726,7 +4349,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:29:36 GMT + - Wed, 16 Jun 2021 06:27:27 GMT expires: - '-1' pragma: @@ -3752,18 +4375,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool update Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --resource-group --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/09693714-9411-4fec-bc88-43ea10b9c57e?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/09693714-9411-4fec-bc88-43ea10b9c57e","name":"09693714-9411-4fec-bc88-43ea10b9c57e","status":"Running","startTime":"2021-06-16T06:27:17Z","endTime":""}' headers: cache-control: - no-cache @@ -3772,7 +4395,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:30:06 GMT + - Wed, 16 Jun 2021 06:27:58 GMT expires: - '-1' pragma: @@ -3798,18 +4421,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool update Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --resource-group --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/09693714-9411-4fec-bc88-43ea10b9c57e?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/09693714-9411-4fec-bc88-43ea10b9c57e","name":"09693714-9411-4fec-bc88-43ea10b9c57e","status":"Running","startTime":"2021-06-16T06:27:17Z","endTime":""}' headers: cache-control: - no-cache @@ -3818,7 +4441,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:30:37 GMT + - Wed, 16 Jun 2021 06:28:28 GMT expires: - '-1' pragma: @@ -3844,18 +4467,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool update Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --resource-group --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/09693714-9411-4fec-bc88-43ea10b9c57e?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/09693714-9411-4fec-bc88-43ea10b9c57e","name":"09693714-9411-4fec-bc88-43ea10b9c57e","status":"Running","startTime":"2021-06-16T06:27:17Z","endTime":""}' headers: cache-control: - no-cache @@ -3864,7 +4487,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:31:07 GMT + - Wed, 16 Jun 2021 06:28:59 GMT expires: - '-1' pragma: @@ -3890,18 +4513,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool update Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --resource-group --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/09693714-9411-4fec-bc88-43ea10b9c57e?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/09693714-9411-4fec-bc88-43ea10b9c57e","name":"09693714-9411-4fec-bc88-43ea10b9c57e","status":"Running","startTime":"2021-06-16T06:27:17Z","endTime":""}' headers: cache-control: - no-cache @@ -3910,7 +4533,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:31:38 GMT + - Wed, 16 Jun 2021 06:29:29 GMT expires: - '-1' pragma: @@ -3936,18 +4559,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool update Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --resource-group --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/09693714-9411-4fec-bc88-43ea10b9c57e?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/09693714-9411-4fec-bc88-43ea10b9c57e","name":"09693714-9411-4fec-bc88-43ea10b9c57e","status":"Running","startTime":"2021-06-16T06:27:17Z","endTime":""}' headers: cache-control: - no-cache @@ -3956,7 +4579,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:32:09 GMT + - Wed, 16 Jun 2021 06:30:00 GMT expires: - '-1' pragma: @@ -3982,18 +4605,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool update Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --resource-group --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/09693714-9411-4fec-bc88-43ea10b9c57e?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/09693714-9411-4fec-bc88-43ea10b9c57e","name":"09693714-9411-4fec-bc88-43ea10b9c57e","status":"Running","startTime":"2021-06-16T06:27:17Z","endTime":""}' headers: cache-control: - no-cache @@ -4002,7 +4625,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:32:39 GMT + - Wed, 16 Jun 2021 06:30:31 GMT expires: - '-1' pragma: @@ -4028,18 +4651,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool update Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --resource-group --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/09693714-9411-4fec-bc88-43ea10b9c57e?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/09693714-9411-4fec-bc88-43ea10b9c57e","name":"09693714-9411-4fec-bc88-43ea10b9c57e","status":"Running","startTime":"2021-06-16T06:27:17Z","endTime":""}' headers: cache-control: - no-cache @@ -4048,7 +4671,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:33:10 GMT + - Wed, 16 Jun 2021 06:31:01 GMT expires: - '-1' pragma: @@ -4074,18 +4697,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool update Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --resource-group --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/09693714-9411-4fec-bc88-43ea10b9c57e?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/09693714-9411-4fec-bc88-43ea10b9c57e","name":"09693714-9411-4fec-bc88-43ea10b9c57e","status":"Running","startTime":"2021-06-16T06:27:17Z","endTime":""}' headers: cache-control: - no-cache @@ -4094,7 +4717,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:33:41 GMT + - Wed, 16 Jun 2021 06:31:31 GMT expires: - '-1' pragma: @@ -4120,18 +4743,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool update Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --resource-group --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/09693714-9411-4fec-bc88-43ea10b9c57e?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/09693714-9411-4fec-bc88-43ea10b9c57e","name":"09693714-9411-4fec-bc88-43ea10b9c57e","status":"Running","startTime":"2021-06-16T06:27:17Z","endTime":""}' headers: cache-control: - no-cache @@ -4140,7 +4763,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:34:11 GMT + - Wed, 16 Jun 2021 06:32:02 GMT expires: - '-1' pragma: @@ -4166,18 +4789,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool update Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --resource-group --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/09693714-9411-4fec-bc88-43ea10b9c57e?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/09693714-9411-4fec-bc88-43ea10b9c57e","name":"09693714-9411-4fec-bc88-43ea10b9c57e","status":"Running","startTime":"2021-06-16T06:27:17Z","endTime":""}' headers: cache-control: - no-cache @@ -4186,7 +4809,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:34:41 GMT + - Wed, 16 Jun 2021 06:32:32 GMT expires: - '-1' pragma: @@ -4212,27 +4835,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool update Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --resource-group --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/09693714-9411-4fec-bc88-43ea10b9c57e?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/09693714-9411-4fec-bc88-43ea10b9c57e","name":"09693714-9411-4fec-bc88-43ea10b9c57e","status":"Succeeded","startTime":"2021-06-16T06:27:17Z","endTime":"2021-06-16T06:33:00Z","properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-16T03:32:03.9430937Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T06:27:15.6381309Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Running"},"sku":{"name":"Standard","tier":"Standard"}}}' headers: cache-control: - no-cache content-length: - - '243' + - '1346' content-type: - application/json date: - - Tue, 01 Jun 2021 09:35:12 GMT + - Wed, 16 Jun 2021 06:33:04 GMT expires: - '-1' pragma: @@ -4258,27 +4881,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool update Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --resource-group --disks User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-16T03:32:03.9430937Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T06:27:15.6381309Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Running"},"sku":{"name":"Standard","tier":"Standard"}}' headers: cache-control: - no-cache content-length: - - '243' + - '1067' content-type: - application/json date: - - Tue, 01 Jun 2021 09:35:43 GMT + - Wed, 16 Jun 2021 06:33:05 GMT expires: - '-1' pragma: @@ -4296,6 +4919,60 @@ interactions: status: code: 200 message: OK +- request: + body: '{"properties": {"luns": [{"name": "lun0", "managedDiskAzureResourceId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"}, + {"name": "lun1", "managedDiskAzureResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003"}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-pool iscsi-target update + Connection: + - keep-alive + Content-Length: + - '386' + Content-Type: + - application/json + ParameterSetName: + - --name --disk-pool-name --resource-group --luns --luns + User-Agent: + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007?api-version=2021-04-01-preview + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/d5226da4-68af-4502-a2cb-0bc58307266f?api-version=2021-04-01-preview + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 16 Jun 2021 06:35:16 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationresults/d5226da4-68af-4502-a2cb-0bc58307266f?api-version=2021-04-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-async-operation-timeout: + - PT1H + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-ms-return-client-request-id: + - 'true' + status: + code: 202 + message: Accepted - request: body: null headers: @@ -4304,27 +4981,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool iscsi-target update Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --disk-pool-name --resource-group --luns --luns User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/d5226da4-68af-4502-a2cb-0bc58307266f?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/d5226da4-68af-4502-a2cb-0bc58307266f","name":"d5226da4-68af-4502-a2cb-0bc58307266f","status":"Running","startTime":"2021-06-16T06:35:16Z"}' headers: cache-control: - no-cache content-length: - - '243' + - '230' content-type: - application/json date: - - Tue, 01 Jun 2021 09:36:13 GMT + - Wed, 16 Jun 2021 06:35:26 GMT expires: - '-1' pragma: @@ -4350,27 +5027,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool iscsi-target update Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --disk-pool-name --resource-group --luns --luns User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/d5226da4-68af-4502-a2cb-0bc58307266f?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/d5226da4-68af-4502-a2cb-0bc58307266f","name":"d5226da4-68af-4502-a2cb-0bc58307266f","status":"Succeeded","startTime":"2021-06-16T06:35:16Z","endTime":"2021-06-16T06:35:33Z","properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007","name":"iscsi000007","type":"Microsoft.StoragePool/diskPools/iscsiTargets","systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-16T04:50:27.1571342Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T06:35:14.9113001Z"},"properties":{"targetIqn":"iqn.2021-06.com.microsoft:iscsi000007","aclMode":"Dynamic","luns":[{"managedDiskAzureResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002","name":"lun0","lun":0},{"managedDiskAzureResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003","name":"lun1","lun":1}],"endpoints":["10.0.0.5:3260","10.0.0.4:3260"],"provisioningState":"Succeeded","status":"Healthy"}}}' headers: cache-control: - no-cache content-length: - - '243' + - '1314' content-type: - application/json date: - - Tue, 01 Jun 2021 09:36:44 GMT + - Wed, 16 Jun 2021 06:35:57 GMT expires: - '-1' pragma: @@ -4396,27 +5073,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool stop + - disk-pool iscsi-target update Connection: - keep-alive ParameterSetName: - - --name --resource-group + - --name --disk-pool-name --resource-group --luns --luns User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007","name":"iscsi000007","type":"Microsoft.StoragePool/diskPools/iscsiTargets","systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-16T04:50:27.1571342Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T06:35:14.9113001Z"},"properties":{"targetIqn":"iqn.2021-06.com.microsoft:iscsi000007","aclMode":"Dynamic","luns":[{"managedDiskAzureResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002","name":"lun0","lun":0},{"managedDiskAzureResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003","name":"lun1","lun":1}],"endpoints":["10.0.0.5:3260","10.0.0.4:3260"],"provisioningState":"Succeeded","status":"Healthy"}}' headers: cache-control: - no-cache content-length: - - '243' + - '1035' content-type: - application/json date: - - Tue, 01 Jun 2021 09:37:15 GMT + - Wed, 16 Jun 2021 06:35:57 GMT expires: - '-1' pragma: @@ -4438,48 +5115,52 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - disk-pool stop Connection: - keep-alive + Content-Length: + - '0' ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/deallocate?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '' headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a?api-version=2021-04-01-preview cache-control: - no-cache content-length: - - '243' - content-type: - - application/json + - '0' date: - - Tue, 01 Jun 2021 09:37:45 GMT + - Wed, 16 Jun 2021 06:35:58 GMT expires: - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationresults/3e61ab2f-523b-4454-9610-d0cad1cabb0a?api-version=2021-04-01-preview pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff + x-ms-async-operation-timeout: + - PT1H + x-ms-ratelimit-remaining-subscription-writes: + - '1199' x-ms-return-client-request-id: - 'true' status: - code: 200 - message: OK + code: 202 + message: Accepted - request: body: null headers: @@ -4494,12 +5175,12 @@ interactions: ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a","name":"3e61ab2f-523b-4454-9610-d0cad1cabb0a","status":"Running","startTime":"2021-06-16T06:35:59Z","endTime":""}' headers: cache-control: - no-cache @@ -4508,7 +5189,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:38:16 GMT + - Wed, 16 Jun 2021 06:36:09 GMT expires: - '-1' pragma: @@ -4540,12 +5221,12 @@ interactions: ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a","name":"3e61ab2f-523b-4454-9610-d0cad1cabb0a","status":"Running","startTime":"2021-06-16T06:35:59Z","endTime":""}' headers: cache-control: - no-cache @@ -4554,7 +5235,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:38:46 GMT + - Wed, 16 Jun 2021 06:36:39 GMT expires: - '-1' pragma: @@ -4586,12 +5267,12 @@ interactions: ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Running","startTime":"2021-06-01T09:27:23Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a","name":"3e61ab2f-523b-4454-9610-d0cad1cabb0a","status":"Running","startTime":"2021-06-16T06:35:59Z","endTime":""}' headers: cache-control: - no-cache @@ -4600,7 +5281,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:39:17 GMT + - Wed, 16 Jun 2021 06:37:10 GMT expires: - '-1' pragma: @@ -4632,22 +5313,21 @@ interactions: ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","name":"a10e08d3-29e8-44b8-8ee5-3d5d4dc7f714","status":"Succeeded","startTime":"2021-06-01T09:27:23Z","endTime":"2021-06-01T09:39:34Z","properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-01T09:02:04.8070554Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-01T09:21:50.5834578Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Stopped - (deallocated)"},"sku":{"name":"Standard","tier":"Standard"}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a","name":"3e61ab2f-523b-4454-9610-d0cad1cabb0a","status":"Running","startTime":"2021-06-16T06:35:59Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '1360' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:39:47 GMT + - Wed, 16 Jun 2021 06:37:41 GMT expires: - '-1' pragma: @@ -4669,32 +5349,31 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - - disk-pool show + - disk-pool stop Connection: - keep-alive ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-01T09:02:04.8070554Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-01T09:21:50.5834578Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Stopped - (deallocated)"},"sku":{"name":"Standard","tier":"Standard"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a","name":"3e61ab2f-523b-4454-9610-d0cad1cabb0a","status":"Running","startTime":"2021-06-16T06:35:59Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '1081' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:39:50 GMT + - Wed, 16 Jun 2021 06:38:11 GMT expires: - '-1' pragma: @@ -4716,50 +5395,48 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - - disk-pool start + - disk-pool stop Connection: - keep-alive - Content-Length: - - '0' ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/start?api-version=2021-04-01-preview + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a?api-version=2021-04-01-preview response: body: - string: '' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a","name":"3e61ab2f-523b-4454-9610-d0cad1cabb0a","status":"Running","startTime":"2021-06-16T06:35:59Z","endTime":""}' headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/84dcd3d9-03cc-49b7-9cef-da87a936e86a?api-version=2021-04-01-preview cache-control: - no-cache content-length: - - '0' + - '243' + content-type: + - application/json date: - - Tue, 01 Jun 2021 09:39:51 GMT + - Wed, 16 Jun 2021 06:38:42 GMT expires: - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationresults/84dcd3d9-03cc-49b7-9cef-da87a936e86a?api-version=2021-04-01-preview pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' x-ms-return-client-request-id: - 'true' status: - code: 202 - message: Accepted + code: 200 + message: OK - request: body: null headers: @@ -4768,18 +5445,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool start + - disk-pool stop Connection: - keep-alive ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/84dcd3d9-03cc-49b7-9cef-da87a936e86a?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/84dcd3d9-03cc-49b7-9cef-da87a936e86a","name":"84dcd3d9-03cc-49b7-9cef-da87a936e86a","status":"Running","startTime":"2021-06-01T09:39:51Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a","name":"3e61ab2f-523b-4454-9610-d0cad1cabb0a","status":"Running","startTime":"2021-06-16T06:35:59Z","endTime":""}' headers: cache-control: - no-cache @@ -4788,7 +5465,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:40:02 GMT + - Wed, 16 Jun 2021 06:39:12 GMT expires: - '-1' pragma: @@ -4814,18 +5491,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool start + - disk-pool stop Connection: - keep-alive ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/84dcd3d9-03cc-49b7-9cef-da87a936e86a?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/84dcd3d9-03cc-49b7-9cef-da87a936e86a","name":"84dcd3d9-03cc-49b7-9cef-da87a936e86a","status":"Running","startTime":"2021-06-01T09:39:51Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a","name":"3e61ab2f-523b-4454-9610-d0cad1cabb0a","status":"Running","startTime":"2021-06-16T06:35:59Z","endTime":""}' headers: cache-control: - no-cache @@ -4834,7 +5511,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:40:32 GMT + - Wed, 16 Jun 2021 06:39:43 GMT expires: - '-1' pragma: @@ -4860,18 +5537,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool start + - disk-pool stop Connection: - keep-alive ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/84dcd3d9-03cc-49b7-9cef-da87a936e86a?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/84dcd3d9-03cc-49b7-9cef-da87a936e86a","name":"84dcd3d9-03cc-49b7-9cef-da87a936e86a","status":"Running","startTime":"2021-06-01T09:39:51Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a","name":"3e61ab2f-523b-4454-9610-d0cad1cabb0a","status":"Running","startTime":"2021-06-16T06:35:59Z","endTime":""}' headers: cache-control: - no-cache @@ -4880,7 +5557,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:41:03 GMT + - Wed, 16 Jun 2021 06:40:14 GMT expires: - '-1' pragma: @@ -4906,18 +5583,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool start + - disk-pool stop Connection: - keep-alive ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/84dcd3d9-03cc-49b7-9cef-da87a936e86a?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/84dcd3d9-03cc-49b7-9cef-da87a936e86a","name":"84dcd3d9-03cc-49b7-9cef-da87a936e86a","status":"Running","startTime":"2021-06-01T09:39:51Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a","name":"3e61ab2f-523b-4454-9610-d0cad1cabb0a","status":"Running","startTime":"2021-06-16T06:35:59Z","endTime":""}' headers: cache-control: - no-cache @@ -4926,7 +5603,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:41:33 GMT + - Wed, 16 Jun 2021 06:40:44 GMT expires: - '-1' pragma: @@ -4952,18 +5629,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool start + - disk-pool stop Connection: - keep-alive ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/84dcd3d9-03cc-49b7-9cef-da87a936e86a?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/84dcd3d9-03cc-49b7-9cef-da87a936e86a","name":"84dcd3d9-03cc-49b7-9cef-da87a936e86a","status":"Running","startTime":"2021-06-01T09:39:51Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a","name":"3e61ab2f-523b-4454-9610-d0cad1cabb0a","status":"Running","startTime":"2021-06-16T06:35:59Z","endTime":""}' headers: cache-control: - no-cache @@ -4972,7 +5649,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:42:03 GMT + - Wed, 16 Jun 2021 06:41:14 GMT expires: - '-1' pragma: @@ -4998,18 +5675,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool start + - disk-pool stop Connection: - keep-alive ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/84dcd3d9-03cc-49b7-9cef-da87a936e86a?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/84dcd3d9-03cc-49b7-9cef-da87a936e86a","name":"84dcd3d9-03cc-49b7-9cef-da87a936e86a","status":"Running","startTime":"2021-06-01T09:39:51Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a","name":"3e61ab2f-523b-4454-9610-d0cad1cabb0a","status":"Running","startTime":"2021-06-16T06:35:59Z","endTime":""}' headers: cache-control: - no-cache @@ -5018,7 +5695,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:42:35 GMT + - Wed, 16 Jun 2021 06:41:45 GMT expires: - '-1' pragma: @@ -5044,27 +5721,28 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool start + - disk-pool stop Connection: - keep-alive ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/84dcd3d9-03cc-49b7-9cef-da87a936e86a?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/84dcd3d9-03cc-49b7-9cef-da87a936e86a","name":"84dcd3d9-03cc-49b7-9cef-da87a936e86a","status":"Succeeded","startTime":"2021-06-01T09:39:51Z","endTime":"2021-06-01T09:42:48Z","properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-01T09:02:04.8070554Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-01T09:21:50.5834578Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Running"},"sku":{"name":"Standard","tier":"Standard"}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/3e61ab2f-523b-4454-9610-d0cad1cabb0a","name":"3e61ab2f-523b-4454-9610-d0cad1cabb0a","status":"Succeeded","startTime":"2021-06-16T06:35:59Z","endTime":"2021-06-16T06:42:09Z","properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-16T03:32:03.9430937Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T06:27:15.6381309Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Stopped + (deallocated)"},"sku":{"name":"Standard","tier":"Standard"}}}' headers: cache-control: - no-cache content-length: - - '1346' + - '1360' content-type: - application/json date: - - Tue, 01 Jun 2021 09:43:05 GMT + - Wed, 16 Jun 2021 06:42:17 GMT expires: - '-1' pragma: @@ -5096,21 +5774,22 @@ interactions: ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-01T09:02:04.8070554Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-01T09:21:50.5834578Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Running"},"sku":{"name":"Standard","tier":"Standard"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-16T03:32:03.9430937Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T06:27:15.6381309Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Stopped + (deallocated)"},"sku":{"name":"Standard","tier":"Standard"}}' headers: cache-control: - no-cache content-length: - - '1067' + - '1081' content-type: - application/json date: - - Tue, 01 Jun 2021 09:43:07 GMT + - Wed, 16 Jun 2021 06:42:19 GMT expires: - '-1' pragma: @@ -5136,33 +5815,33 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target delete + - disk-pool start Connection: - keep-alive Content-Length: - '0' ParameterSetName: - - --name --disk-pool-name --resource-group -y + - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007?api-version=2021-04-01-preview + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/start?api-version=2021-04-01-preview response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9432929d-460f-4d2f-b917-5b4ec1ab3039?api-version=2021-04-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/b922af2d-e06a-46fc-a4c7-3d96ae8af24a?api-version=2021-04-01-preview cache-control: - no-cache content-length: - '0' date: - - Tue, 01 Jun 2021 09:43:08 GMT + - Wed, 16 Jun 2021 06:42:21 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationresults/9432929d-460f-4d2f-b917-5b4ec1ab3039?api-version=2021-04-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationresults/b922af2d-e06a-46fc-a4c7-3d96ae8af24a?api-version=2021-04-01-preview pragma: - no-cache strict-transport-security: @@ -5171,8 +5850,8 @@ interactions: - nosniff x-ms-async-operation-timeout: - PT1H - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' x-ms-return-client-request-id: - 'true' status: @@ -5186,27 +5865,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target delete + - disk-pool start Connection: - keep-alive ParameterSetName: - - --name --disk-pool-name --resource-group -y + - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9432929d-460f-4d2f-b917-5b4ec1ab3039?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/b922af2d-e06a-46fc-a4c7-3d96ae8af24a?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/9432929d-460f-4d2f-b917-5b4ec1ab3039","name":"9432929d-460f-4d2f-b917-5b4ec1ab3039","status":"Running","startTime":"2021-06-01T09:43:09Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/b922af2d-e06a-46fc-a4c7-3d96ae8af24a","name":"b922af2d-e06a-46fc-a4c7-3d96ae8af24a","status":"Running","startTime":"2021-06-16T06:42:21Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '224' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:43:19 GMT + - Wed, 16 Jun 2021 06:42:32 GMT expires: - '-1' pragma: @@ -5232,27 +5911,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target delete + - disk-pool start Connection: - keep-alive ParameterSetName: - - --name --disk-pool-name --resource-group -y + - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9432929d-460f-4d2f-b917-5b4ec1ab3039?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/b922af2d-e06a-46fc-a4c7-3d96ae8af24a?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/9432929d-460f-4d2f-b917-5b4ec1ab3039","name":"9432929d-460f-4d2f-b917-5b4ec1ab3039","status":"Running","startTime":"2021-06-01T09:43:09Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/b922af2d-e06a-46fc-a4c7-3d96ae8af24a","name":"b922af2d-e06a-46fc-a4c7-3d96ae8af24a","status":"Running","startTime":"2021-06-16T06:42:21Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '224' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:43:49 GMT + - Wed, 16 Jun 2021 06:43:02 GMT expires: - '-1' pragma: @@ -5278,27 +5957,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target delete + - disk-pool start Connection: - keep-alive ParameterSetName: - - --name --disk-pool-name --resource-group -y + - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9432929d-460f-4d2f-b917-5b4ec1ab3039?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/b922af2d-e06a-46fc-a4c7-3d96ae8af24a?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/9432929d-460f-4d2f-b917-5b4ec1ab3039","name":"9432929d-460f-4d2f-b917-5b4ec1ab3039","status":"Running","startTime":"2021-06-01T09:43:09Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/b922af2d-e06a-46fc-a4c7-3d96ae8af24a","name":"b922af2d-e06a-46fc-a4c7-3d96ae8af24a","status":"Running","startTime":"2021-06-16T06:42:21Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '224' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:44:21 GMT + - Wed, 16 Jun 2021 06:43:33 GMT expires: - '-1' pragma: @@ -5324,27 +6003,73 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target delete + - disk-pool start Connection: - keep-alive ParameterSetName: - - --name --disk-pool-name --resource-group -y + - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/9432929d-460f-4d2f-b917-5b4ec1ab3039?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/b922af2d-e06a-46fc-a4c7-3d96ae8af24a?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/9432929d-460f-4d2f-b917-5b4ec1ab3039","name":"9432929d-460f-4d2f-b917-5b4ec1ab3039","status":"Succeeded","startTime":"2021-06-01T09:43:09Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/b922af2d-e06a-46fc-a4c7-3d96ae8af24a","name":"b922af2d-e06a-46fc-a4c7-3d96ae8af24a","status":"Running","startTime":"2021-06-16T06:42:21Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '232' + - '243' + content-type: + - application/json + date: + - Wed, 16 Jun 2021 06:44:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-return-client-request-id: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - disk-pool start + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group + User-Agent: + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/b922af2d-e06a-46fc-a4c7-3d96ae8af24a?api-version=2021-04-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/b922af2d-e06a-46fc-a4c7-3d96ae8af24a","name":"b922af2d-e06a-46fc-a4c7-3d96ae8af24a","status":"Succeeded","startTime":"2021-06-16T06:42:21Z","endTime":"2021-06-16T06:44:21Z","properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-16T03:32:03.9430937Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T06:27:15.6381309Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Running"},"sku":{"name":"Standard","tier":"Standard"}}}' + headers: + cache-control: + - no-cache + content-length: + - '1346' content-type: - application/json date: - - Tue, 01 Jun 2021 09:44:51 GMT + - Wed, 16 Jun 2021 06:44:34 GMT expires: - '-1' pragma: @@ -5370,27 +6095,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool iscsi-target list + - disk-pool show Connection: - keep-alive ParameterSetName: - - --disk-pool-name --resource-group + - --name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006?api-version=2021-04-01-preview response: body: - string: '{"value":[],"nextLink":null}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006","name":"diskpool000006","type":"Microsoft.StoragePool/diskPools","location":"eastus","tags":{},"systemData":{"createdBy":"zuh@microsoft.com","createdByType":"User","createdAt":"2021-06-16T03:32:03.9430937Z","lastModifiedBy":"zuh@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T06:27:15.6381309Z"},"properties":{"disks":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000002"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/disk000003"}],"availabilityZones":["3"],"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet000005","provisioningState":"Succeeded","status":"Running"},"sku":{"name":"Standard","tier":"Standard"}}' headers: cache-control: - no-cache content-length: - - '28' + - '1067' content-type: - application/json date: - - Tue, 01 Jun 2021 09:44:52 GMT + - Wed, 16 Jun 2021 06:44:37 GMT expires: - '-1' pragma: @@ -5416,33 +6141,33 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool delete + - disk-pool iscsi-target delete Connection: - keep-alive Content-Length: - '0' ParameterSetName: - - --name --resource-group -y + - --name --disk-pool-name --resource-group -y User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets/iscsi000007?api-version=2021-04-01-preview response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/eb01e89c-4af4-4f78-a619-118827dbdb86?api-version=2021-04-01-preview cache-control: - no-cache content-length: - '0' date: - - Tue, 01 Jun 2021 09:44:55 GMT + - Wed, 16 Jun 2021 06:44:39 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationresults/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationresults/eb01e89c-4af4-4f78-a619-118827dbdb86?api-version=2021-04-01-preview pragma: - no-cache strict-transport-security: @@ -5466,27 +6191,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool delete + - disk-pool iscsi-target delete Connection: - keep-alive ParameterSetName: - - --name --resource-group -y + - --name --disk-pool-name --resource-group -y User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/eb01e89c-4af4-4f78-a619-118827dbdb86?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/bf861c30-d207-4735-b28f-e808bd0c899b","name":"bf861c30-d207-4735-b28f-e808bd0c899b","status":"Running","startTime":"2021-06-01T09:44:55Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/eb01e89c-4af4-4f78-a619-118827dbdb86","name":"eb01e89c-4af4-4f78-a619-118827dbdb86","status":"Running","startTime":"2021-06-16T06:44:39Z"}' headers: cache-control: - no-cache content-length: - - '237' + - '230' content-type: - application/json date: - - Tue, 01 Jun 2021 09:45:05 GMT + - Wed, 16 Jun 2021 06:44:49 GMT expires: - '-1' pragma: @@ -5512,27 +6237,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool delete + - disk-pool iscsi-target delete Connection: - keep-alive ParameterSetName: - - --name --resource-group -y + - --name --disk-pool-name --resource-group -y User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/eb01e89c-4af4-4f78-a619-118827dbdb86?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/bf861c30-d207-4735-b28f-e808bd0c899b","name":"bf861c30-d207-4735-b28f-e808bd0c899b","status":"Running","startTime":"2021-06-01T09:44:55Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/eb01e89c-4af4-4f78-a619-118827dbdb86","name":"eb01e89c-4af4-4f78-a619-118827dbdb86","status":"Running","startTime":"2021-06-16T06:44:39Z"}' headers: cache-control: - no-cache content-length: - - '237' + - '230' content-type: - application/json date: - - Tue, 01 Jun 2021 09:45:35 GMT + - Wed, 16 Jun 2021 06:45:20 GMT expires: - '-1' pragma: @@ -5558,27 +6283,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool delete + - disk-pool iscsi-target delete Connection: - keep-alive ParameterSetName: - - --name --resource-group -y + - --name --disk-pool-name --resource-group -y User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/eb01e89c-4af4-4f78-a619-118827dbdb86?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/bf861c30-d207-4735-b28f-e808bd0c899b","name":"bf861c30-d207-4735-b28f-e808bd0c899b","status":"Running","startTime":"2021-06-01T09:44:55Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/eb01e89c-4af4-4f78-a619-118827dbdb86","name":"eb01e89c-4af4-4f78-a619-118827dbdb86","status":"Running","startTime":"2021-06-16T06:44:39Z"}' headers: cache-control: - no-cache content-length: - - '237' + - '230' content-type: - application/json date: - - Tue, 01 Jun 2021 09:46:06 GMT + - Wed, 16 Jun 2021 06:45:50 GMT expires: - '-1' pragma: @@ -5604,27 +6329,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - disk-pool delete + - disk-pool iscsi-target delete Connection: - keep-alive ParameterSetName: - - --name --resource-group -y + - --name --disk-pool-name --resource-group -y User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/eb01e89c-4af4-4f78-a619-118827dbdb86?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/bf861c30-d207-4735-b28f-e808bd0c899b","name":"bf861c30-d207-4735-b28f-e808bd0c899b","status":"Running","startTime":"2021-06-01T09:44:55Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/eb01e89c-4af4-4f78-a619-118827dbdb86","name":"eb01e89c-4af4-4f78-a619-118827dbdb86","status":"Succeeded","startTime":"2021-06-16T06:44:39Z"}' headers: cache-control: - no-cache content-length: - - '237' + - '232' content-type: - application/json date: - - Tue, 01 Jun 2021 09:46:36 GMT + - Wed, 16 Jun 2021 06:46:21 GMT expires: - '-1' pragma: @@ -5646,31 +6371,31 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - - disk-pool delete + - disk-pool iscsi-target list Connection: - keep-alive ParameterSetName: - - --name --resource-group -y + - --disk-pool-name --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006/iscsiTargets?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/bf861c30-d207-4735-b28f-e808bd0c899b","name":"bf861c30-d207-4735-b28f-e808bd0c899b","status":"Running","startTime":"2021-06-01T09:44:55Z","endTime":""}' + string: '{"value":[],"nextLink":null}' headers: cache-control: - no-cache content-length: - - '237' + - '28' content-type: - application/json date: - - Tue, 01 Jun 2021 09:47:06 GMT + - Wed, 16 Jun 2021 06:46:23 GMT expires: - '-1' pragma: @@ -5692,48 +6417,52 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - disk-pool delete Connection: - keep-alive + Content-Length: + - '0' ParameterSetName: - --name --resource-group -y User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools/diskpool000006?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/bf861c30-d207-4735-b28f-e808bd0c899b","name":"bf861c30-d207-4735-b28f-e808bd0c899b","status":"Running","startTime":"2021-06-01T09:44:55Z","endTime":""}' + string: '' headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3?api-version=2021-04-01-preview cache-control: - no-cache content-length: - - '237' - content-type: - - application/json + - '0' date: - - Tue, 01 Jun 2021 09:47:37 GMT + - Wed, 16 Jun 2021 06:46:25 GMT expires: - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationresults/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3?api-version=2021-04-01-preview pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff + x-ms-async-operation-timeout: + - PT1H + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' x-ms-return-client-request-id: - 'true' status: - code: 200 - message: OK + code: 202 + message: Accepted - request: body: null headers: @@ -5748,21 +6477,21 @@ interactions: ParameterSetName: - --name --resource-group -y User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/bf861c30-d207-4735-b28f-e808bd0c899b","name":"bf861c30-d207-4735-b28f-e808bd0c899b","status":"Running","startTime":"2021-06-01T09:44:55Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","name":"b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","status":"Running","startTime":"2021-06-16T06:46:25Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '237' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:48:08 GMT + - Wed, 16 Jun 2021 06:46:35 GMT expires: - '-1' pragma: @@ -5794,21 +6523,21 @@ interactions: ParameterSetName: - --name --resource-group -y User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/bf861c30-d207-4735-b28f-e808bd0c899b","name":"bf861c30-d207-4735-b28f-e808bd0c899b","status":"Running","startTime":"2021-06-01T09:44:55Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","name":"b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","status":"Running","startTime":"2021-06-16T06:46:25Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '237' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:48:39 GMT + - Wed, 16 Jun 2021 06:47:06 GMT expires: - '-1' pragma: @@ -5840,21 +6569,21 @@ interactions: ParameterSetName: - --name --resource-group -y User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/bf861c30-d207-4735-b28f-e808bd0c899b","name":"bf861c30-d207-4735-b28f-e808bd0c899b","status":"Running","startTime":"2021-06-01T09:44:55Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","name":"b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","status":"Running","startTime":"2021-06-16T06:46:25Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '237' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:49:09 GMT + - Wed, 16 Jun 2021 06:47:36 GMT expires: - '-1' pragma: @@ -5886,21 +6615,21 @@ interactions: ParameterSetName: - --name --resource-group -y User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/bf861c30-d207-4735-b28f-e808bd0c899b","name":"bf861c30-d207-4735-b28f-e808bd0c899b","status":"Running","startTime":"2021-06-01T09:44:55Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","name":"b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","status":"Running","startTime":"2021-06-16T06:46:25Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '237' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:49:40 GMT + - Wed, 16 Jun 2021 06:48:08 GMT expires: - '-1' pragma: @@ -5932,21 +6661,21 @@ interactions: ParameterSetName: - --name --resource-group -y User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/bf861c30-d207-4735-b28f-e808bd0c899b","name":"bf861c30-d207-4735-b28f-e808bd0c899b","status":"Running","startTime":"2021-06-01T09:44:55Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","name":"b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","status":"Running","startTime":"2021-06-16T06:46:25Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '237' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:50:10 GMT + - Wed, 16 Jun 2021 06:48:38 GMT expires: - '-1' pragma: @@ -5978,21 +6707,21 @@ interactions: ParameterSetName: - --name --resource-group -y User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/bf861c30-d207-4735-b28f-e808bd0c899b","name":"bf861c30-d207-4735-b28f-e808bd0c899b","status":"Running","startTime":"2021-06-01T09:44:55Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","name":"b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","status":"Running","startTime":"2021-06-16T06:46:25Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '237' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:50:41 GMT + - Wed, 16 Jun 2021 06:49:08 GMT expires: - '-1' pragma: @@ -6024,21 +6753,21 @@ interactions: ParameterSetName: - --name --resource-group -y User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/bf861c30-d207-4735-b28f-e808bd0c899b","name":"bf861c30-d207-4735-b28f-e808bd0c899b","status":"Running","startTime":"2021-06-01T09:44:55Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","name":"b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","status":"Running","startTime":"2021-06-16T06:46:25Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '237' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:51:11 GMT + - Wed, 16 Jun 2021 06:49:39 GMT expires: - '-1' pragma: @@ -6070,21 +6799,21 @@ interactions: ParameterSetName: - --name --resource-group -y User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/bf861c30-d207-4735-b28f-e808bd0c899b","name":"bf861c30-d207-4735-b28f-e808bd0c899b","status":"Running","startTime":"2021-06-01T09:44:55Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","name":"b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","status":"Running","startTime":"2021-06-16T06:46:25Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '237' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:51:43 GMT + - Wed, 16 Jun 2021 06:50:09 GMT expires: - '-1' pragma: @@ -6116,21 +6845,21 @@ interactions: ParameterSetName: - --name --resource-group -y User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/bf861c30-d207-4735-b28f-e808bd0c899b","name":"bf861c30-d207-4735-b28f-e808bd0c899b","status":"Running","startTime":"2021-06-01T09:44:55Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","name":"b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","status":"Running","startTime":"2021-06-16T06:46:25Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '237' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:52:13 GMT + - Wed, 16 Jun 2021 06:50:40 GMT expires: - '-1' pragma: @@ -6162,21 +6891,21 @@ interactions: ParameterSetName: - --name --resource-group -y User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations//operationStatus/bf861c30-d207-4735-b28f-e808bd0c899b","name":"bf861c30-d207-4735-b28f-e808bd0c899b","status":"Running","startTime":"2021-06-01T09:44:55Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","name":"b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","status":"Running","startTime":"2021-06-16T06:46:25Z","endTime":""}' headers: cache-control: - no-cache content-length: - - '237' + - '243' content-type: - application/json date: - - Tue, 01 Jun 2021 09:52:43 GMT + - Wed, 16 Jun 2021 06:51:11 GMT expires: - '-1' pragma: @@ -6208,21 +6937,21 @@ interactions: ParameterSetName: - --name --resource-group -y User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/bf861c30-d207-4735-b28f-e808bd0c899b?api-version=2021-04-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.StoragePool/locations/eastus/operationsStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3?api-version=2021-04-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/bf861c30-d207-4735-b28f-e808bd0c899b","name":"bf861c30-d207-4735-b28f-e808bd0c899b","status":"Succeeded","startTime":"2021-06-01T09:44:55Z","endTime":""}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus/operationStatus/b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","name":"b8cb2c96-fc9e-43ff-bc35-349d8c4b51e3","status":"Succeeded","startTime":"2021-06-16T06:46:25Z","endTime":"2021-06-16T06:51:36Z"}' headers: cache-control: - no-cache content-length: - - '245' + - '265' content-type: - application/json date: - - Tue, 01 Jun 2021 09:53:14 GMT + - Wed, 16 Jun 2021 06:51:42 GMT expires: - '-1' pragma: @@ -6254,7 +6983,7 @@ interactions: ParameterSetName: - --resource-group User-Agent: - - AZURECLI/2.24.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.25.0 azsdk-python-storagepoolmanagement/unknown Python/3.8.3 (Windows-10-10.0.19041-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.StoragePool/diskPools?api-version=2021-04-01-preview response: @@ -6268,7 +6997,7 @@ interactions: content-type: - application/json date: - - Tue, 01 Jun 2021 09:53:16 GMT + - Wed, 16 Jun 2021 06:51:44 GMT expires: - '-1' pragma: diff --git a/src/diskpool/azext_diskpool/tests/latest/test_disk_scenario_manual.py b/src/diskpool/azext_diskpool/tests/latest/test_disk_scenario_manual.py index 8fb778a7df3..8449d5e6234 100644 --- a/src/diskpool/azext_diskpool/tests/latest/test_disk_scenario_manual.py +++ b/src/diskpool/azext_diskpool/tests/latest/test_disk_scenario_manual.py @@ -29,10 +29,10 @@ def test_diskpool_scenario_manual(self, resource_group): 'storagePoolObjectId': '09f10f07-08cf-4ab7-be0f-e9ae3d72b9ad' }) result = self.cmd('disk create --name {diskName} --resource-group {rg} --zone {zone} --location {location} ' - '--sku Premium_LRS --max-shares 2 --size-gb 256').get_output_in_json() + '--sku Premium_LRS --max-shares 2 --size-gb 1024').get_output_in_json() self.kwargs['diskId'] = result['id'] result = self.cmd('disk create --name {diskName2} --resource-group {rg} --zone {zone} --location {location} ' - '--sku Premium_LRS --max-shares 2 --size-gb 256').get_output_in_json() + '--sku Premium_LRS --max-shares 2 --size-gb 1024').get_output_in_json() self.kwargs['diskId2'] = result['id'] with mock.patch('azure.cli.command_modules.role.custom._gen_guid', side_effect=self.create_guid): self.cmd('role assignment create --assignee-object-id {storagePoolObjectId} --role "Virtual Machine Contributor" --scope {diskId}') @@ -61,9 +61,8 @@ def test_diskpool_scenario_manual(self, resource_group): self.cmd('disk-pool list --resource-group {rg}', checks=[self.check('length(@)', 1)]) - # TODO: Add back when fixed in server - # self.cmd('disk-pool list-outbound-network-dependency-endpoint --name {diskPoolName} --resource-group {rg}', - # checks=[self.check('length(@)', 1)]) + self.cmd('disk-pool list-outbound-network-dependency-endpoint --name {diskPoolName} --resource-group {rg}', + checks=[self.check('length(@)', 4)]) # Create an ISCSI target self.cmd('disk-pool iscsi-target create --name {targetName} --disk-pool-name {diskPoolName} ' diff --git a/src/diskpool/gen.zip b/src/diskpool/gen.zip index 5cc78ecaf40..71ffdbab05c 100644 Binary files a/src/diskpool/gen.zip and b/src/diskpool/gen.zip differ diff --git a/src/diskpool/report.md b/src/diskpool/report.md index c06b564075e..38f1df62cb8 100644 --- a/src/diskpool/report.md +++ b/src/diskpool/report.md @@ -22,6 +22,7 @@ |[az disk-pool create](#DiskPoolsCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersDiskPoolsCreateOrUpdate#Create)|[Example](#ExamplesDiskPoolsCreateOrUpdate#Create)| |[az disk-pool update](#DiskPoolsUpdate)|Update|[Parameters](#ParametersDiskPoolsUpdate)|[Example](#ExamplesDiskPoolsUpdate)| |[az disk-pool delete](#DiskPoolsDelete)|Delete|[Parameters](#ParametersDiskPoolsDelete)|[Example](#ExamplesDiskPoolsDelete)| +|[az disk-pool list-outbound-network-dependency-endpoint](#DiskPoolsListOutboundNetworkDependenciesEndpoints)|ListOutboundNetworkDependenciesEndpoints|[Parameters](#ParametersDiskPoolsListOutboundNetworkDependenciesEndpoints)|[Example](#ExamplesDiskPoolsListOutboundNetworkDependenciesEndpoints)| |[az disk-pool list-skus](#DiskPoolsList)|List|[Parameters](#ParametersDiskPoolsList)|[Example](#ExamplesDiskPoolsList)| |[az disk-pool start](#DiskPoolsStart)|Start|[Parameters](#ParametersDiskPoolsStart)|[Example](#ExamplesDiskPoolsStart)| |[az disk-pool stop](#DiskPoolsDeallocate)|Deallocate|[Parameters](#ParametersDiskPoolsDeallocate)|[Example](#ExamplesDiskPoolsDeallocate)| @@ -124,6 +125,19 @@ az disk-pool delete --name "myDiskPool" --resource-group "myResourceGroup" |**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| |**--disk-pool-name**|string|The name of the Disk Pool.|disk_pool_name|diskPoolName| +#### Command `az disk-pool list-outbound-network-dependency-endpoint` + +##### Example +``` +az disk-pool list-outbound-network-dependency-endpoint --name "SampleAse" --resource-group \ +"Sample-WestUSResourceGroup" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|The name of the resource group. The name is case insensitive.|resource_group_name|resourceGroupName| +|**--disk-pool-name**|string|The name of the Disk Pool.|disk_pool_name|diskPoolName| + #### Command `az disk-pool list-skus` ##### Example diff --git a/src/diskpool/setup.py b/src/diskpool/setup.py index 8bfa1256ec9..a731b37c907 100644 --- a/src/diskpool/setup.py +++ b/src/diskpool/setup.py @@ -10,7 +10,7 @@ from setuptools import setup, find_packages # HISTORY.rst entry. -VERSION = '0.1.1' +VERSION = '0.1.2' try: from azext_diskpool.manual.version import VERSION except ImportError: diff --git a/src/dnc/HISTORY.rst b/src/dnc/HISTORY.rst index 1c139576ba0..0942adbdddd 100644 --- a/src/dnc/HISTORY.rst +++ b/src/dnc/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.1.1 +++++++ +* Updated extension-mode to preview + 0.1.0 ++++++ * Initial release. diff --git a/src/dnc/azext_dnc/azext_metadata.json b/src/dnc/azext_dnc/azext_metadata.json index cfc30c747c7..30fdaf614ee 100644 --- a/src/dnc/azext_dnc/azext_metadata.json +++ b/src/dnc/azext_dnc/azext_metadata.json @@ -1,4 +1,4 @@ { - "azext.isExperimental": true, + "azext.isPreview": true, "azext.minCliCoreVersion": "2.15.0" } \ No newline at end of file diff --git a/src/dnc/azext_dnc/generated/commands.py b/src/dnc/azext_dnc/generated/commands.py index 2784ab57041..61ad2fba0ad 100644 --- a/src/dnc/azext_dnc/generated/commands.py +++ b/src/dnc/azext_dnc/generated/commands.py @@ -60,5 +60,5 @@ def load_command_table(self, _): g.custom_command('delete', 'dnc_delegated_subnet_service_delete', supports_no_wait=True, confirmation=True) g.custom_wait_command('wait', 'dnc_delegated_subnet_service_show') - with self.command_group('dnc', is_experimental=True): + with self.command_group('dnc', is_preview=True): pass diff --git a/src/dnc/setup.py b/src/dnc/setup.py index 71d89822c42..ec960229622 100644 --- a/src/dnc/setup.py +++ b/src/dnc/setup.py @@ -10,7 +10,7 @@ from setuptools import setup, find_packages # HISTORY.rst entry. -VERSION = '0.1.0' +VERSION = '0.1.1' try: from azext_dnc.manual.version import VERSION except ImportError: diff --git a/src/front-door/HISTORY.rst b/src/front-door/HISTORY.rst index c770c5de4bc..733e44ce074 100644 --- a/src/front-door/HISTORY.rst +++ b/src/front-door/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +1.0.15 +++++++ +* Add az network front-door backend-pool backend update command: Update a backend to Front Door backend pool. +* Fix backend related bugs + 1.0.14 ++++++ * Migrate to Track2 SDK. diff --git a/src/front-door/azext_front_door/_help.py b/src/front-door/azext_front_door/_help.py index 1480c91d140..b9908dd5ea3 100644 --- a/src/front-door/azext_front_door/_help.py +++ b/src/front-door/azext_front_door/_help.py @@ -98,6 +98,11 @@ short-summary: Add a backend to a Front Door backend pool. """ +helps['network front-door backend-pool backend update'] = """ + type: command + short-summary: Update a backend to a Front Door backend pool. +""" + helps['network front-door backend-pool backend list'] = """ type: command short-summary: List backends of a Front Door backend pool. diff --git a/src/front-door/azext_front_door/_params.py b/src/front-door/azext_front_door/_params.py index 1908f36f756..69e430ef07a 100644 --- a/src/front-door/azext_front_door/_params.py +++ b/src/front-door/azext_front_door/_params.py @@ -129,9 +129,9 @@ def load_arguments(self, _): c.argument('https_port', type=int, help='HTTPS TCP port number.') c.argument('weight', type=int, help='Weight of this endpoint for load balancing purposes.') c.argument('private_link_alias', help='The Alias of the Private Link resource. Populating this optional field indicates that this backend is \'Private\'.') - c.argument('private_link_resource_id', help='The Resource Id of the Private Link. Populating this optional field indicates that this backend is \'Private\'.') + c.argument('private_link_resource_id', options_list=['--private-link-resource-id', '--resource-id'], help='The Resource Id of the Private Link. Populating this optional field indicates that this backend is \'Private\'.') c.argument('private_link_location', help='The location of the Private Link resource. Required only if \'privateLinkResourceId\' is populated.') - c.argument('private_link_approval_message', help='A custom message to be included in the approval request to connect to the Private Link.') + c.argument('private_link_approval_message', options_list=['--private-link-approval-message', '--approval-message'], help='A custom message to be included in the approval request to connect to the Private Link.') c.argument('backend_host_header', help='Host header sent to the backend.') c.argument('backend_pool_name', options_list='--pool-name', help='Name of the backend pool.') c.argument('index', type=int, help='Index of the backend to remove (starting with 1).') diff --git a/src/front-door/azext_front_door/commands.py b/src/front-door/azext_front_door/commands.py index dd213b93d62..84891b1a412 100644 --- a/src/front-door/azext_front_door/commands.py +++ b/src/front-door/azext_front_door/commands.py @@ -105,6 +105,7 @@ def load_command_table(self, _): with self.command_group('network front-door backend-pool backend', frontdoor_sdk) as g: g.custom_command('add', 'add_fd_backend') + g.custom_command('update', 'update_fd_backend') g.custom_command('list', 'list_fd_backends') g.custom_command('remove', 'remove_fd_backend') diff --git a/src/front-door/azext_front_door/custom.py b/src/front-door/azext_front_door/custom.py index 24e018dd0df..d8cb411e97b 100644 --- a/src/front-door/azext_front_door/custom.py +++ b/src/front-door/azext_front_door/custom.py @@ -49,8 +49,8 @@ def _upsert_frontdoor_subresource(cmd, resource_group_name, front_door_name, col item_name = getattr(obj_to_add, key_name) if item_name is None: - from knack.util import CLIError - raise CLIError( + from azure.cli.core.azclierror import ClientRequestError + raise ClientRequestError( "Unable to resolve a value for key '{}' with which to match.".format(key_name)) match = next((x for x in collection if getattr(x, key_name, None) == item_name), None) if match: @@ -84,8 +84,8 @@ def get_func(cmd, resource_group_name, resource_name, item_name): result = next((x for x in items if x.name.lower() == item_name.lower()), None) if not result: - from knack.util import CLIError - raise CLIError("Item '{}' does not exist on {} '{}'".format( + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("Item '{}' does not exist on {} '{}'".format( item_name, resource, resource_name)) return result @@ -113,8 +113,8 @@ def delete_func(cmd, resource_group_name, resource_name, item_name, no_wait=Fals client.begin_create_or_update, resource_group_name, resource_name, item).result() if next((x for x in getattr(result, prop) if x.name.lower() == item_name.lower()), None): - from knack.util import CLIError - raise CLIError("Failed to delete '{}' on '{}'".format(item_name, resource_name)) + from azure.cli.core.azclierror import AzureResponseError + raise AzureResponseError("Failed to delete '{}' on '{}'".format(item_name, resource_name)) func_name = 'delete_fd_{}_{}'.format(resource, prop) setattr(sys.modules[__name__], func_name, delete_func) @@ -328,14 +328,14 @@ def configure_fd_frontend_endpoint_enable_https(cmd, resource_group_name, front_ secret_name=None, secret_version=None, certificate_source='FrontDoor', vault_id=None, minimum_tls_version='1.2'): - from knack.util import CLIError + from azure.cli.core.azclierror import ArgumentUsageError if certificate_source != 'AzureKeyVault' and any([vault_id, secret_name, secret_version]): - raise CLIError("usage error: no need to specify --vault-id, --secret-name and --secret-version " - "for Front Door managed certificate source.") + raise ArgumentUsageError("usage error: no need to specify --vault-id, --secret-name and --secret-version " + "for Front Door managed certificate source.") if certificate_source == 'AzureKeyVault' and not all([vault_id, secret_name]): - raise CLIError("usage error: at least --vault-id and --secret-name are rquired for " - "Azure Key Vault certificate source.") + raise ArgumentUsageError("usage error: at least --vault-id and --secret-name are rquired for " + "Azure Key Vault certificate source.") # if not being disabled, then must be enabled if certificate_source == 'FrontDoor': @@ -436,7 +436,7 @@ def add_fd_backend(cmd, resource_group_name, front_door_name, backend_pool_name, enabled_state='Disabled' if disabled else 'Enabled', priority=priority, weight=weight, - backend_host_header=backend_host_header or address, + backend_host_header=address if backend_host_header is None else backend_host_header, private_link_alias=private_link_alias, private_link_resource_id=private_link_resource_id, private_link_location=private_link_location, @@ -446,32 +446,68 @@ def add_fd_backend(cmd, resource_group_name, front_door_name, backend_pool_name, frontdoor = client.get(resource_group_name, front_door_name) backend_pool = next((x for x in frontdoor.backend_pools if x.name == backend_pool_name), None) if not backend_pool: - from knack.util import CLIError - raise CLIError("Backend pool '{}' could not be found on frontdoor '{}'".format( + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("Backend pool '{}' could not be found on frontdoor '{}'".format( backend_pool_name, front_door_name)) backend_pool.backends.append(backend) client.begin_create_or_update(resource_group_name, front_door_name, frontdoor).result() return backend +def update_fd_backend(cmd, resource_group_name, front_door_name, backend_pool_name, index, address=None, + http_port=None, https_port=None, disabled=None, priority=None, weight=None, + backend_host_header=None, private_link_alias=None, private_link_resource_id=None, + private_link_location=None, private_link_approval_message=None): + + client = cf_frontdoor(cmd.cli_ctx, None) + frontdoor = client.get(resource_group_name, front_door_name) + backend_pool = next((x for x in frontdoor.backend_pools if x.name == backend_pool_name), None) + if not backend_pool: + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("Backend pool '{}' could not be found on frontdoor '{}'".format( + backend_pool_name, front_door_name)) + if index > len(backend_pool.backends) or index <= 0: + from azure.cli.core.azclierror import InvalidArgumentValueError + raise InvalidArgumentValueError("Backend range is from 1 to {}, index '{}' could not be found on frontdoor '{}'".format( + len(backend_pool.backends), index, front_door_name)) + backend = backend_pool.backends[index - 1] + with UpdateContext(backend) as c: + c.update_param('address', address, None) + c.update_param('http_port', http_port, None) + c.update_param('https_port', https_port, None) + c.update_param('enabled_state', 'Disabled' if disabled else 'Enabled', None) + c.update_param('priority', priority, None) + c.update_param('weight', weight, None) + c.update_param('backend_host_header', backend_host_header, None) + c.update_param('private_link_alias', private_link_alias, None) + c.update_param('private_link_resource_id', private_link_resource_id, None) + c.update_param('private_link_location', private_link_location, None) + c.update_param('private_link_approval_message', private_link_approval_message, None) + frontdoor = client.begin_create_or_update(resource_group_name, front_door_name, frontdoor).result() + + backend_pool = next((x for x in frontdoor.backend_pools if x.name == backend_pool_name), None) + backend = backend_pool.backends[index - 1] + return backend + + def list_fd_backends(cmd, resource_group_name, front_door_name, backend_pool_name): client = cf_frontdoor(cmd.cli_ctx, None) frontdoor = client.get(resource_group_name, front_door_name) backend_pool = next((x for x in frontdoor.backend_pools if x.name == backend_pool_name), None) if not backend_pool: - from knack.util import CLIError - raise CLIError("Backend pool '{}' could not be found on frontdoor '{}'".format( + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("Backend pool '{}' could not be found on frontdoor '{}'".format( backend_pool_name, front_door_name)) return backend_pool.backends def remove_fd_backend(cmd, resource_group_name, front_door_name, backend_pool_name, index): - from knack.util import CLIError + from azure.cli.core.azclierror import ResourceNotFoundError, InvalidArgumentValueError client = cf_frontdoor(cmd.cli_ctx, None) frontdoor = client.get(resource_group_name, front_door_name) backend_pool = next((x for x in frontdoor.backend_pools if x.name == backend_pool_name), None) if not backend_pool: - raise CLIError("Backend pool '{}' could not be found on frontdoor '{}'".format( + raise ResourceNotFoundError("Backend pool '{}' could not be found on frontdoor '{}'".format( backend_pool_name, front_door_name)) try: if index > 0: @@ -479,9 +515,9 @@ def remove_fd_backend(cmd, resource_group_name, front_door_name, backend_pool_na elif index < 0: backend_pool.backends.pop(index) else: - raise CLIError('invalid index. Index can range from 1 to {}'.format(len(backend_pool.backends))) + raise InvalidArgumentValueError('invalid index. Index can range from 1 to {}'.format(len(backend_pool.backends))) except IndexError: - raise CLIError('invalid index. Index can range from 1 to {}'.format(len(backend_pool.backends))) + raise InvalidArgumentValueError('invalid index. Index can range from 1 to {}'.format(len(backend_pool.backends))) client.begin_create_or_update(resource_group_name, front_door_name, frontdoor).result() @@ -507,8 +543,8 @@ def update_fd_health_probe_settings(cmd, resource_group_name, front_door_name, i frontdoor = client.get(resource_group_name, front_door_name) probe_setting = next((x for x in frontdoor.health_probe_settings if x.name == item_name), None) if not probe_setting: - from knack.util import CLIError - raise CLIError("Health probe setting '{}' could not be found on frontdoor '{}'".format( + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("Health probe setting '{}' could not be found on frontdoor '{}'".format( item_name, front_door_name)) if probe_method: probe_setting.health_probe_method = probe_method @@ -568,12 +604,12 @@ def routing_rule_usage_helper(route_type, backend_pool=None, custom_forwarding_p # pylint: disable=line-too-long if 'Forward' in route_type and any([custom_host, custom_path, custom_fragment, custom_query_string]) and getattr(redirect_type, 'is_default', None) and getattr(redirect_protocol, 'is_default', None): - from knack.util import CLIError - raise CLIError(forwarding_usage) + from azure.cli.core.azclierror import ArgumentUsageError + raise ArgumentUsageError(forwarding_usage) if 'Redirect' in route_type and any([custom_forwarding_path, forwarding_protocol, backend_pool, query_parameters, cache_duration, query_parameter_strip_directive, dynamic_compression]): - from knack.util import CLIError - raise CLIError(redirect_usage) + from azure.cli.core.azclierror import ArgumentUsageError + raise ArgumentUsageError(redirect_usage) def create_fd_routing_rules(cmd, resource_group_name, front_door_name, item_name, frontend_endpoints, route_type, @@ -811,8 +847,8 @@ def add_override_azure_managed_rule_set(cmd, resource_group_name, policy_name, r setRule = True if not setRule: - from knack.util import CLIError - raise CLIError("type '{}' not found".format(rule_set_type)) + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("type '{}' not found".format(rule_set_type)) return client.begin_create_or_update(resource_group_name, policy_name, policy) @@ -841,8 +877,8 @@ def remove_override_azure_managed_rule_set(cmd, resource_group_name, policy_name removedRule = True if not removedRule: - from knack.util import CLIError - raise CLIError("rule '{}' not found".format(rule_id)) + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("rule '{}' not found".format(rule_id)) return client.begin_create_or_update(resource_group_name, policy_name, policy) @@ -857,8 +893,8 @@ def list_override_azure_managed_rule_set(cmd, resource_group_name, policy_name, if rule_set.rule_set_type.upper() == rule_set_type.upper(): return rule_set.rule_group_overrides - from knack.util import CLIError - raise CLIError("rule set '{}' not found".format(rule_set_type)) + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("rule set '{}' not found".format(rule_set_type)) def add_exclusion_azure_managed_rule_set(cmd, resource_group_name, policy_name, rule_set_type, @@ -866,10 +902,10 @@ def add_exclusion_azure_managed_rule_set(cmd, resource_group_name, policy_name, rule_group_id=None, rule_id=None): from azext_front_door.vendored_sdks.models import ManagedRuleOverride, ManagedRuleGroupOverride from azext_front_door.vendored_sdks.models import ManagedRuleExclusion - from knack.util import CLIError + from azure.cli.core.azclierror import RequiredArgumentMissingError, ResourceNotFoundError if rule_id and not rule_group_id: - raise CLIError("Must specify rule-group-id of the rule when you specify rule-id") + raise RequiredArgumentMissingError("Must specify rule-group-id of the rule when you specify rule-id") client = cf_waf_policies(cmd.cli_ctx, None) policy = client.get(resource_group_name, policy_name) @@ -891,7 +927,7 @@ def add_exclusion_azure_managed_rule_set(cmd, resource_group_name, policy_name, break if rule_set_obj is None: - raise CLIError("type '{}' not found".format(rule_set_type)) + raise ResourceNotFoundError("type '{}' not found".format(rule_set_type)) rule_group_override = None if rule_group_id is None: @@ -927,9 +963,9 @@ def add_exclusion_azure_managed_rule_set(cmd, resource_group_name, policy_name, exclusion_holder.exclusions.append(exclusion) else: if rule_id: - raise CLIError("rule {} within group {} within type '{}' not found" - .format(rule_id, rule_group_id, rule_set_type)) - raise CLIError("group {} within type '{}' not found".format(rule_group_id, rule_set_type)) + raise ResourceNotFoundError("rule {} within group {} within type '{}' not found" + .format(rule_id, rule_group_id, rule_set_type)) + raise ResourceNotFoundError("group {} within type '{}' not found".format(rule_group_id, rule_set_type)) return client.begin_create_or_update(resource_group_name, policy_name, policy) @@ -937,10 +973,10 @@ def add_exclusion_azure_managed_rule_set(cmd, resource_group_name, policy_name, def remove_exclusion_azure_managed_rule_set(cmd, resource_group_name, policy_name, rule_set_type, match_variable, operator, value, rule_group_id=None, rule_id=None): - from knack.util import CLIError + from azure.cli.core.azclierror import RequiredArgumentMissingError, ResourceNotFoundError if rule_id and not rule_group_id: - raise CLIError("Must specify rule-group-id of the rule when you specify rule-id") + raise RequiredArgumentMissingError("Must specify rule-group-id of the rule when you specify rule-id") client = cf_waf_policies(cmd.cli_ctx, None) policy = client.get(resource_group_name, policy_name) @@ -948,7 +984,7 @@ def remove_exclusion_azure_managed_rule_set(cmd, resource_group_name, policy_nam exclusions = None if not policy.managed_rules.managed_rule_sets: - raise CLIError("Exclusion not found") + raise ResourceNotFoundError("Exclusion not found") rule_set_obj = None for rule_set in policy.managed_rules.managed_rule_sets: @@ -962,7 +998,7 @@ def remove_exclusion_azure_managed_rule_set(cmd, resource_group_name, policy_nam exclusions = rule_set_obj.exclusions else: if not rule_set_obj.rule_group_overrides: - raise CLIError("Exclusion not found") + raise ResourceNotFoundError("Exclusion not found") for rg in rule_set_obj.rule_group_overrides: if rg.rule_group_name.upper() == rule_group_id.upper(): rule_group_override = rg @@ -973,14 +1009,14 @@ def remove_exclusion_azure_managed_rule_set(cmd, resource_group_name, policy_nam exclusions = rule_group_override.exclusions else: if rule_group_override.rules is None: - raise CLIError("Exclusion not found") + raise ResourceNotFoundError("Exclusion not found") for rule in rule_group_override.rules: if rule.rule_id.upper() == rule_id.upper(): exclusions = rule.exclusions break if exclusions is None: - raise CLIError("Exclusion not found") + raise ResourceNotFoundError("Exclusion not found") for i, exclusion in enumerate(exclusions): if (exclusion.match_variable == match_variable and @@ -992,19 +1028,19 @@ def remove_exclusion_azure_managed_rule_set(cmd, resource_group_name, policy_nam def list_exclusion_azure_managed_rule_set(cmd, resource_group_name, policy_name, rule_set_type, rule_group_id=None, rule_id=None): - from knack.util import CLIError + from azure.cli.core.azclierror import RequiredArgumentMissingError, ResourceNotFoundError client = cf_waf_policies(cmd.cli_ctx, None) policy = client.get(resource_group_name, policy_name) if rule_id and not rule_group_id: - raise CLIError("Must specify rule-group-id of the rule when you specify rule-id") + raise RequiredArgumentMissingError("Must specify rule-group-id of the rule when you specify rule-id") client = cf_waf_policies(cmd.cli_ctx, None) policy = client.get(resource_group_name, policy_name) if policy.managed_rules.managed_rule_sets is None: - raise CLIError("rule set '{}' not found".format(rule_set_type)) + raise ResourceNotFoundError("rule set '{}' not found".format(rule_set_type)) rule_set_obj = None for rule_set in policy.managed_rules.managed_rule_sets: @@ -1015,10 +1051,10 @@ def list_exclusion_azure_managed_rule_set(cmd, resource_group_name, policy_name, break if rule_set_obj is None: - raise CLIError("rule set '{}' not found".format(rule_set_type)) + raise ResourceNotFoundError("rule set '{}' not found".format(rule_set_type)) if rule_set_obj.rule_group_overrides is None: - raise CLIError("rule set '{}' has no overrides".format(rule_set_type)) + raise RequiredArgumentMissingError("rule set '{}' has no overrides".format(rule_set_type)) rule_group_override = None for rg in rule_set_obj.rule_group_overrides: @@ -1030,16 +1066,16 @@ def list_exclusion_azure_managed_rule_set(cmd, resource_group_name, policy_name, break if rule_group_override is None: - raise CLIError("rule group '{}' not found".format(rule_group_id)) + raise ResourceNotFoundError("rule group '{}' not found".format(rule_group_id)) if rule_group_override.rules is None: - raise CLIError("rule '{}' not found".format(rule_id)) + raise ResourceNotFoundError("rule '{}' not found".format(rule_id)) for rule in rule_group_override.rules: if rule.rule_id.upper() == rule_id.upper(): return rule.exclusions or [] - raise CLIError("rule '{}' not found".format(rule_id)) + raise ResourceNotFoundError("rule '{}' not found".format(rule_id)) def list_managed_rules_definitions(cmd): @@ -1051,8 +1087,8 @@ def list_managed_rules_definitions(cmd): def create_wp_custom_rule(cmd, resource_group_name, policy_name, rule_name, priority, rule_type, action, rate_limit_duration=None, rate_limit_threshold=None, disabled=None): if rule_type.lower() == "ratelimitrule" and (rate_limit_duration is None or rate_limit_threshold is None): - from knack.util import CLIError - raise CLIError("rate_limit_duration and rate_limit_threshold are required for a RateLimitRule") + from azure.cli.core.azclierror import RequiredArgumentMissingError + raise RequiredArgumentMissingError("rate_limit_duration and rate_limit_threshold are required for a RateLimitRule") from azext_front_door.vendored_sdks.models import CustomRule client = cf_waf_policies(cmd.cli_ctx, None) @@ -1088,8 +1124,8 @@ def update_wp_custom_rule(cmd, resource_group_name, policy_name, rule_name, prio c.update_param('enabled_state', 'Enabled' if not disabled else 'Disabled', 'Disabled') if not foundRule: - from knack.util import CLIError - raise CLIError("rule '{}' not found".format(rule_name)) + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("rule '{}' not found".format(rule_name)) return cached_put(cmd, client.begin_create_or_update, policy, resource_group_name, policy_name).result() @@ -1113,8 +1149,8 @@ def show_wp_custom_rule(cmd, resource_group_name, policy_name, rule_name): try: return next(x for x in policy.custom_rules.rules if x.name.lower() == rule_name.lower()) except StopIteration: - from knack.util import CLIError - raise CLIError("rule '{}' not found".format(rule_name)) + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("rule '{}' not found".format(rule_name)) def remove_custom_rule_match_condition(cmd, resource_group_name, policy_name, rule_name, @@ -1128,14 +1164,14 @@ def remove_custom_rule_match_condition(cmd, resource_group_name, policy_name, ru foundRule = True if index >= len(rule.match_conditions): - from knack.util import CLIError - raise CLIError("Index out of bounds") + from azure.cli.core.azclierror import InvalidArgumentValueError + raise InvalidArgumentValueError("Index out of bounds") rule.match_conditions = [v for (i, v) in enumerate(rule.match_conditions) if i != index] if not foundRule: - from knack.util import CLIError - raise CLIError("rule '{}' not found".format(rule_name)) + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("rule '{}' not found".format(rule_name)) return cached_put(cmd, client.begin_create_or_update, policy, resource_group_name, policy_name).result() @@ -1167,8 +1203,8 @@ def add_custom_rule_match_condition(cmd, resource_group_name, policy_name, rule_ )) if not foundRule: - from knack.util import CLIError - raise CLIError("rule '{}' not found".format(rule_name)) + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("rule '{}' not found".format(rule_name)) return cached_put(cmd, client.begin_create_or_update, policy, resource_group_name, policy_name).result() @@ -1181,8 +1217,8 @@ def list_custom_rule_match_conditions(cmd, resource_group_name, policy_name, rul if rule.name.upper() == rule_name.upper(): return rule.match_conditions - from knack.util import CLIError - raise CLIError("rule '{}' not found".format(rule_name)) + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("rule '{}' not found".format(rule_name)) # endregion @@ -1254,8 +1290,8 @@ def delete_rules_engine_rule(cmd, resource_group_name, front_door_name, rules_en rules_engine = client.get(resource_group_name, front_door_name, rules_engine_name) rules_engine.rules = [x for x in rules_engine.rules if x.name.lower() != rule_name.lower()] if not rules_engine.rules: - from knack.util import CLIError - raise CLIError("Rules Engine must at least contain one rule") + from azure.cli.core.azclierror import BadRequestError + raise BadRequestError("Rules Engine must at least contain one rule") rules_engine_parameters = RulesEngine(rules=rules_engine.rules) return client.begin_create_or_update(resource_group_name, @@ -1270,8 +1306,8 @@ def show_rules_engine_rule(cmd, resource_group_name, front_door_name, rules_engi try: return next(x for x in rules_engine.rules if x.name.lower() == rule_name.lower()) except StopIteration: - from knack.util import CLIError - raise CLIError("rule '{}' not found".format(rule_name)) + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("rule '{}' not found".format(rule_name)) def list_rules_engine_rule(cmd, resource_group_name, front_door_name, rules_engine_name): @@ -1296,8 +1332,8 @@ def update_rules_engine_rule(cmd, resource_group_name, front_door_name, break if not found_rule: - from knack.util import CLIError - raise CLIError("rule '{}' not found".format(rule_name)) + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("rule '{}' not found".format(rule_name)) rules_engine_parameters = RulesEngine(rules=rules_engine.rules) return client.begin_create_or_update(resource_group_name, @@ -1328,8 +1364,8 @@ def add_rules_engine_condition(cmd, resource_group_name, front_door_name, rules_ rule.match_conditions.append(condition) if not found_rule: - from knack.util import CLIError - raise CLIError("rule '{}' not found".format(rule_name)) + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("rule '{}' not found".format(rule_name)) rules_engine_parameters = RulesEngine(rules=rules_engine.rules) return client.begin_create_or_update(resource_group_name, @@ -1350,14 +1386,14 @@ def remove_rules_engine_condition(cmd, resource_group_name, found_rule = True if index >= len(rule.match_conditions): - from knack.util import CLIError - raise CLIError("Index out of bounds") + from azure.cli.core.azclierror import InvalidArgumentValueError + raise InvalidArgumentValueError("Index out of bounds") rule.match_conditions = [v for (i, v) in enumerate(rule.match_conditions) if i != index] if not found_rule: - from knack.util import CLIError - raise CLIError("rule '{}' not found".format(rule_name)) + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("rule '{}' not found".format(rule_name)) rules_engine_parameters = RulesEngine(rules=rules_engine.rules) return client.begin_create_or_update(resource_group_name, @@ -1376,8 +1412,8 @@ def list_rules_engine_condition(cmd, resource_group_name, if rule.name.upper() == rule_name.upper(): return rule.match_conditions - from knack.util import CLIError - raise CLIError("rule '{}' not found".format(rule_name)) + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("rule '{}' not found".format(rule_name)) def add_rules_engine_action(cmd, resource_group_name, front_door_name, rules_engine_name, rule_name, @@ -1443,8 +1479,8 @@ def add_action_helper(rule): add_action_helper(rule) if not found_rule: - from knack.util import CLIError - raise CLIError("rule '{}' not found".format(rule_name)) + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("rule '{}' not found".format(rule_name)) rules_engine_parameters = RulesEngine(rules=rules_engine.rules) return client.begin_create_or_update(resource_group_name, @@ -1457,8 +1493,8 @@ def remove_rules_engine_action(cmd, resource_group_name, front_door_name, rules_ rule_name, action_type, index=None): def check_index(arr): if index is None or index >= len(arr): - from knack.util import CLIError - raise CLIError("Index out of bounds") + from azure.cli.core.azclierror import InvalidArgumentValueError + raise InvalidArgumentValueError("Index out of bounds") def remove_action_helper(rule): if action_type.lower() == 'requestheader': @@ -1486,12 +1522,12 @@ def remove_action_helper(rule): if len(rule.action.request_header_actions) <= 0 and \ len(rule.action.response_header_actions) <= 0 and \ rule.action.route_configuration_override is None: - from knack.util import CLIError - raise CLIError("Cannot remove all actions from rule '{}'".format(rule_name)) + from azure.cli.core.azclierror import BadRequestError + raise BadRequestError("Cannot remove all actions from rule '{}'".format(rule_name)) if not found_rule: - from knack.util import CLIError - raise CLIError("rule '{}' not found".format(rule_name)) + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("rule '{}' not found".format(rule_name)) rules_engine_parameters = RulesEngine(rules=rules_engine.rules) return client.begin_create_or_update(resource_group_name, @@ -1510,7 +1546,7 @@ def list_rules_engine_action(cmd, resource_group_name, if rule.name.upper() == rule_name.upper(): return rule.action - from knack.util import CLIError - raise CLIError("rule '{}' not found".format(rule_name)) + from azure.cli.core.azclierror import ResourceNotFoundError + raise ResourceNotFoundError("rule '{}' not found".format(rule_name)) # endregion diff --git a/src/front-door/azext_front_door/tests/latest/recordings/test_backend_pool_backend.yaml b/src/front-door/azext_front_door/tests/latest/recordings/test_backend_pool_backend.yaml new file mode 100644 index 00000000000..5ec5a566be8 --- /dev/null +++ b/src/front-door/azext_front_door/tests/latest/recordings/test_backend_pool_backend.yaml @@ -0,0 +1,1494 @@ +interactions: +- request: + body: '{"location": "global", "properties": {"friendlyName": "clifrontdoor000002", + "routingRules": [{"name": "DefaultRoutingRule", "properties": {"frontendEndpoints": + [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/frontendEndpoints/DefaultFrontendEndpoint"}], + "acceptedProtocols": ["Http"], "patternsToMatch": ["/*"], "enabledState": "Enabled", + "routeConfiguration": {"@odata.type": "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration", + "forwardingProtocol": "MatchRequest", "backendPool": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/backendPools/DefaultBackendPool"}}}}], + "loadBalancingSettings": [{"name": "DefaultLoadBalancingSettings", "properties": + {"sampleSize": 4, "successfulSamplesRequired": 2, "additionalLatencyMilliseconds": + 0}}], "healthProbeSettings": [{"name": "DefaultProbeSettings", "properties": + {"path": "/", "protocol": "Https", "intervalInSeconds": 30, "healthProbeMethod": + "HEAD"}}], "backendPools": [{"name": "DefaultBackendPool", "properties": {"backends": + [{"address": "202.120.2.3", "httpPort": 80, "httpsPort": 443, "enabledState": + "Enabled", "priority": 1, "weight": 50, "backendHostHeader": "202.120.2.3"}], + "loadBalancingSettings": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings"}, + "healthProbeSettings": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings"}}}], + "frontendEndpoints": [{"name": "DefaultFrontendEndpoint", "properties": {"hostName": + "clifrontdoor000002.azurefd.net", "sessionAffinityEnabledState": "Disabled"}}], + "backendPoolsSettings": {"enforceCertificateNameCheck": "Enabled"}, "enabledState": + "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door create + Connection: + - keep-alive + Content-Length: + - '2313' + Content-Type: + - application/json + ParameterSetName: + - -g -n --backend-address + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontDoors/clifrontdoor000002?api-version=2020-05-01 + response: + body: + string: "{\r\n \"name\":\"clifrontdoor000002\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002\",\"type\":\"Microsoft.Network/frontdoors\",\"tags\":{\r\n + \ \r\n },\"location\":\"Global\",\"properties\":{\r\n \"provisioningState\":\"Creating\",\"resourceState\":\"Creating\",\"backendPools\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/DefaultBackendPool\",\"name\":\"DefaultBackendPool\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Creating\"\r\n }\r\n }\r\n ],\"healthProbeSettings\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/HealthProbeSettings/DefaultProbeSettings\",\"name\":\"DefaultProbeSettings\",\"type\":\"Microsoft.Network/Frontdoors/HealthProbeSettings\",\"properties\":{\r\n + \ \"intervalInSeconds\":30,\"path\":\"/\",\"protocol\":\"Https\",\"resourceState\":\"Creating\",\"enabledState\":\"Enabled\",\"healthProbeMethod\":\"Head\"\r\n + \ }\r\n }\r\n ],\"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/FrontendEndpoints/DefaultFrontendEndpoint\",\"name\":\"DefaultFrontendEndpoint\",\"type\":\"Microsoft.Network/Frontdoors/FrontendEndpoints\",\"properties\":{\r\n + \ \"hostName\":\"clifrontdoor000002.azurefd.net\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":0,\"webApplicationFirewallPolicyLink\":null,\"customHttpsProvisioningState\":null,\"customHttpsProvisioningSubstate\":null,\"customHttpsConfiguration\":null,\"resourceState\":\"Creating\"\r\n + \ }\r\n }\r\n ],\"loadBalancingSettings\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/LoadBalancingSettings/DefaultLoadBalancingSettings\",\"name\":\"DefaultLoadBalancingSettings\",\"type\":\"Microsoft.Network/Frontdoors/LoadBalancingSettings\",\"properties\":{\r\n + \ \"additionalLatencyMilliseconds\":0,\"sampleSize\":4,\"successfulSamplesRequired\":2,\"resourceState\":\"Creating\"\r\n + \ }\r\n }\r\n ],\"rulesEngines\":[\r\n \r\n ],\"routingRules\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/RoutingRules/DefaultRoutingRule\",\"name\":\"DefaultRoutingRule\",\"type\":\"Microsoft.Network/Frontdoors/RoutingRules\",\"properties\":{\r\n + \ \"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/frontendEndpoints/DefaultFrontendEndpoint\"\r\n + \ }\r\n ],\"acceptedProtocols\":[\r\n \"Http\"\r\n + \ ],\"patternsToMatch\":[\r\n \"/*\"\r\n ],\"enabledState\":\"Enabled\",\"resourceState\":\"Creating\",\"routeConfiguration\":{\r\n + \ \"@odata.type\":\"#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration\",\"customForwardingPath\":null,\"forwardingProtocol\":\"MatchRequest\",\"cacheConfiguration\":null,\"backendPool\":{\r\n + \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/backendPools/DefaultBackendPool\"\r\n + \ }\r\n },\"rulesEngine\":null,\"webApplicationFirewallPolicyLink\":null\r\n + \ }\r\n }\r\n ],\"backendPoolsSettings\":{\r\n \"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":30\r\n + \ },\"enabledState\":\"Enabled\",\"cName\":\"clifrontdoor000002.azurefd.net\",\"frontdoorId\":\"d9fe5abb-ff39-42b9-87fe-d54202b82e34\",\"friendlyName\":\"clifrontdoor000002\"\r\n + \ }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdooroperationresults/f76cd59c-cf4b-47dd-a4aa-bf2c5dde9682?api-version=2020-05-01 + cache-control: + - no-cache + content-length: + - '5429' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:08:38 GMT + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-powered-by: + - ASP.NET + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door create + Connection: + - keep-alive + ParameterSetName: + - -g -n --backend-address + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdooroperationresults/f76cd59c-cf4b-47dd-a4aa-bf2c5dde9682?api-version=2020-05-01 + response: + body: + string: "{\r\n \"status\":\"InProgress\",\"error\":{\r\n \"code\":\"None\",\"message\":null\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '78' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:08:49 GMT + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door create + Connection: + - keep-alive + ParameterSetName: + - -g -n --backend-address + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdooroperationresults/f76cd59c-cf4b-47dd-a4aa-bf2c5dde9682?api-version=2020-05-01 + response: + body: + string: "{\r\n \"status\":\"Succeeded\",\"error\":{\r\n \"code\":\"None\",\"message\":null\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '77' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:09:20 GMT + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door create + Connection: + - keep-alive + ParameterSetName: + - -g -n --backend-address + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontDoors/clifrontdoor000002?api-version=2020-05-01 + response: + body: + string: "{\r\n \"name\":\"clifrontdoor000002\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002\",\"type\":\"Microsoft.Network/frontdoors\",\"tags\":{\r\n + \ \r\n },\"location\":\"Global\",\"properties\":{\r\n \"provisioningState\":\"Succeeded\",\"resourceState\":\"Enabled\",\"backendPools\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/DefaultBackendPool\",\"name\":\"DefaultBackendPool\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n }\r\n ],\"healthProbeSettings\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/HealthProbeSettings/DefaultProbeSettings\",\"name\":\"DefaultProbeSettings\",\"type\":\"Microsoft.Network/Frontdoors/HealthProbeSettings\",\"properties\":{\r\n + \ \"intervalInSeconds\":30,\"path\":\"/\",\"protocol\":\"Https\",\"resourceState\":\"Enabled\",\"enabledState\":\"Enabled\",\"healthProbeMethod\":\"Head\"\r\n + \ }\r\n }\r\n ],\"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/FrontendEndpoints/DefaultFrontendEndpoint\",\"name\":\"DefaultFrontendEndpoint\",\"type\":\"Microsoft.Network/Frontdoors/FrontendEndpoints\",\"properties\":{\r\n + \ \"hostName\":\"clifrontdoor000002.azurefd.net\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":0,\"webApplicationFirewallPolicyLink\":null,\"customHttpsProvisioningState\":null,\"customHttpsProvisioningSubstate\":null,\"customHttpsConfiguration\":null,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"loadBalancingSettings\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/LoadBalancingSettings/DefaultLoadBalancingSettings\",\"name\":\"DefaultLoadBalancingSettings\",\"type\":\"Microsoft.Network/Frontdoors/LoadBalancingSettings\",\"properties\":{\r\n + \ \"additionalLatencyMilliseconds\":0,\"sampleSize\":4,\"successfulSamplesRequired\":2,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"rulesEngines\":[\r\n \r\n ],\"routingRules\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/RoutingRules/DefaultRoutingRule\",\"name\":\"DefaultRoutingRule\",\"type\":\"Microsoft.Network/Frontdoors/RoutingRules\",\"properties\":{\r\n + \ \"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/frontendEndpoints/DefaultFrontendEndpoint\"\r\n + \ }\r\n ],\"acceptedProtocols\":[\r\n \"Http\"\r\n + \ ],\"patternsToMatch\":[\r\n \"/*\"\r\n ],\"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"routeConfiguration\":{\r\n + \ \"@odata.type\":\"#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration\",\"customForwardingPath\":null,\"forwardingProtocol\":\"MatchRequest\",\"cacheConfiguration\":null,\"backendPool\":{\r\n + \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/backendPools/DefaultBackendPool\"\r\n + \ }\r\n },\"rulesEngine\":null,\"webApplicationFirewallPolicyLink\":null\r\n + \ }\r\n }\r\n ],\"backendPoolsSettings\":{\r\n \"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":30\r\n + \ },\"enabledState\":\"Enabled\",\"cName\":\"clifrontdoor000002.azurefd.net\",\"frontdoorId\":\"d9fe5abb-ff39-42b9-87fe-d54202b82e34\",\"friendlyName\":\"clifrontdoor000002\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '5424' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:09:21 GMT + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door backend-pool create + Connection: + - keep-alive + ParameterSetName: + - -f -g -n --address --load-balancing --probe + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontDoors/clifrontdoor000002?api-version=2020-05-01 + response: + body: + string: "{\r\n \"name\":\"clifrontdoor000002\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002\",\"type\":\"Microsoft.Network/frontdoors\",\"tags\":{\r\n + \ \r\n },\"location\":\"Global\",\"properties\":{\r\n \"provisioningState\":\"Succeeded\",\"resourceState\":\"Enabled\",\"backendPools\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/DefaultBackendPool\",\"name\":\"DefaultBackendPool\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n }\r\n ],\"healthProbeSettings\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/HealthProbeSettings/DefaultProbeSettings\",\"name\":\"DefaultProbeSettings\",\"type\":\"Microsoft.Network/Frontdoors/HealthProbeSettings\",\"properties\":{\r\n + \ \"intervalInSeconds\":30,\"path\":\"/\",\"protocol\":\"Https\",\"resourceState\":\"Enabled\",\"enabledState\":\"Enabled\",\"healthProbeMethod\":\"Head\"\r\n + \ }\r\n }\r\n ],\"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/FrontendEndpoints/DefaultFrontendEndpoint\",\"name\":\"DefaultFrontendEndpoint\",\"type\":\"Microsoft.Network/Frontdoors/FrontendEndpoints\",\"properties\":{\r\n + \ \"hostName\":\"clifrontdoor000002.azurefd.net\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":0,\"webApplicationFirewallPolicyLink\":null,\"customHttpsProvisioningState\":null,\"customHttpsProvisioningSubstate\":null,\"customHttpsConfiguration\":null,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"loadBalancingSettings\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/LoadBalancingSettings/DefaultLoadBalancingSettings\",\"name\":\"DefaultLoadBalancingSettings\",\"type\":\"Microsoft.Network/Frontdoors/LoadBalancingSettings\",\"properties\":{\r\n + \ \"additionalLatencyMilliseconds\":0,\"sampleSize\":4,\"successfulSamplesRequired\":2,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"rulesEngines\":[\r\n \r\n ],\"routingRules\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/RoutingRules/DefaultRoutingRule\",\"name\":\"DefaultRoutingRule\",\"type\":\"Microsoft.Network/Frontdoors/RoutingRules\",\"properties\":{\r\n + \ \"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/frontendEndpoints/DefaultFrontendEndpoint\"\r\n + \ }\r\n ],\"acceptedProtocols\":[\r\n \"Http\"\r\n + \ ],\"patternsToMatch\":[\r\n \"/*\"\r\n ],\"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"routeConfiguration\":{\r\n + \ \"@odata.type\":\"#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration\",\"customForwardingPath\":null,\"forwardingProtocol\":\"MatchRequest\",\"cacheConfiguration\":null,\"backendPool\":{\r\n + \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/backendPools/DefaultBackendPool\"\r\n + \ }\r\n },\"rulesEngine\":null,\"webApplicationFirewallPolicyLink\":null\r\n + \ }\r\n }\r\n ],\"backendPoolsSettings\":{\r\n \"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":30\r\n + \ },\"enabledState\":\"Enabled\",\"cName\":\"clifrontdoor000002.azurefd.net\",\"frontdoorId\":\"d9fe5abb-ff39-42b9-87fe-d54202b82e34\",\"friendlyName\":\"clifrontdoor000002\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '5424' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:09:24 GMT + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"location": "Global", "tags": {}, "properties": {"friendlyName": "clifrontdoor000002", + "routingRules": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/RoutingRules/DefaultRoutingRule", + "name": "DefaultRoutingRule", "properties": {"frontendEndpoints": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/frontendEndpoints/DefaultFrontendEndpoint"}], + "acceptedProtocols": ["Http"], "patternsToMatch": ["/*"], "enabledState": "Enabled", + "routeConfiguration": {"@odata.type": "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration", + "forwardingProtocol": "MatchRequest", "backendPool": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/backendPools/DefaultBackendPool"}}}}], + "loadBalancingSettings": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/LoadBalancingSettings/DefaultLoadBalancingSettings", + "name": "DefaultLoadBalancingSettings", "properties": {"sampleSize": 4, "successfulSamplesRequired": + 2, "additionalLatencyMilliseconds": 0}}], "healthProbeSettings": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/HealthProbeSettings/DefaultProbeSettings", + "name": "DefaultProbeSettings", "properties": {"path": "/", "protocol": "Https", + "intervalInSeconds": 30, "healthProbeMethod": "Head", "enabledState": "Enabled"}}], + "backendPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/DefaultBackendPool", + "name": "DefaultBackendPool", "properties": {"backends": [{"address": "202.120.2.3", + "httpPort": 80, "httpsPort": 443, "enabledState": "Enabled", "priority": 1, + "weight": 50, "backendHostHeader": "202.120.2.3"}], "loadBalancingSettings": + {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings"}, + "healthProbeSettings": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings"}}}, + {"name": "bkp1", "properties": {"backends": [{"address": "202.120.2.3", "httpPort": + 80, "httpsPort": 443, "enabledState": "Enabled", "priority": 1, "weight": 50, + "backendHostHeader": "202.120.2.3"}], "loadBalancingSettings": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings"}, + "healthProbeSettings": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings"}}}], + "frontendEndpoints": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/FrontendEndpoints/DefaultFrontendEndpoint", + "name": "DefaultFrontendEndpoint", "properties": {"hostName": "clifrontdoor000002.azurefd.net", + "sessionAffinityEnabledState": "Disabled", "sessionAffinityTtlSeconds": 0}}], + "backendPoolsSettings": {"enforceCertificateNameCheck": "Enabled", "sendRecvTimeoutSeconds": + 30}, "enabledState": "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door backend-pool create + Connection: + - keep-alive + Content-Length: + - '4442' + Content-Type: + - application/json + ParameterSetName: + - -f -g -n --address --load-balancing --probe + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontDoors/clifrontdoor000002?api-version=2020-05-01 + response: + body: + string: "{\r\n \"name\":\"clifrontdoor000002\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002\",\"type\":\"Microsoft.Network/frontdoors\",\"tags\":{\r\n + \ \r\n },\"location\":\"Global\",\"properties\":{\r\n \"provisioningState\":\"Succeeded\",\"resourceState\":\"Enabled\",\"backendPools\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/DefaultBackendPool\",\"name\":\"DefaultBackendPool\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/bkp1\",\"name\":\"bkp1\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n }\r\n ],\"healthProbeSettings\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/HealthProbeSettings/DefaultProbeSettings\",\"name\":\"DefaultProbeSettings\",\"type\":\"Microsoft.Network/Frontdoors/HealthProbeSettings\",\"properties\":{\r\n + \ \"intervalInSeconds\":30,\"path\":\"/\",\"protocol\":\"Https\",\"resourceState\":\"Enabled\",\"enabledState\":\"Enabled\",\"healthProbeMethod\":\"Head\"\r\n + \ }\r\n }\r\n ],\"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/FrontendEndpoints/DefaultFrontendEndpoint\",\"name\":\"DefaultFrontendEndpoint\",\"type\":\"Microsoft.Network/Frontdoors/FrontendEndpoints\",\"properties\":{\r\n + \ \"hostName\":\"clifrontdoor000002.azurefd.net\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":0,\"webApplicationFirewallPolicyLink\":null,\"customHttpsProvisioningState\":null,\"customHttpsProvisioningSubstate\":null,\"customHttpsConfiguration\":null,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"loadBalancingSettings\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/LoadBalancingSettings/DefaultLoadBalancingSettings\",\"name\":\"DefaultLoadBalancingSettings\",\"type\":\"Microsoft.Network/Frontdoors/LoadBalancingSettings\",\"properties\":{\r\n + \ \"additionalLatencyMilliseconds\":0,\"sampleSize\":4,\"successfulSamplesRequired\":2,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"rulesEngines\":[\r\n \r\n ],\"routingRules\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/RoutingRules/DefaultRoutingRule\",\"name\":\"DefaultRoutingRule\",\"type\":\"Microsoft.Network/Frontdoors/RoutingRules\",\"properties\":{\r\n + \ \"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/frontendEndpoints/DefaultFrontendEndpoint\"\r\n + \ }\r\n ],\"acceptedProtocols\":[\r\n \"Http\"\r\n + \ ],\"patternsToMatch\":[\r\n \"/*\"\r\n ],\"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"routeConfiguration\":{\r\n + \ \"@odata.type\":\"#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration\",\"customForwardingPath\":null,\"forwardingProtocol\":\"MatchRequest\",\"cacheConfiguration\":null,\"backendPool\":{\r\n + \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/backendPools/DefaultBackendPool\"\r\n + \ }\r\n },\"rulesEngine\":null,\"webApplicationFirewallPolicyLink\":null\r\n + \ }\r\n }\r\n ],\"backendPoolsSettings\":{\r\n \"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":30\r\n + \ },\"enabledState\":\"Enabled\",\"cName\":\"clifrontdoor000002.azurefd.net\",\"frontdoorId\":\"d9fe5abb-ff39-42b9-87fe-d54202b82e34\",\"friendlyName\":\"clifrontdoor000002\"\r\n + \ }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdooroperationresults/d0268b12-9f1f-4b59-8170-523b440ab9d5?api-version=2020-05-01 + cache-control: + - no-cache + content-length: + - '6766' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:09:33 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdooroperationresults/d0268b12-9f1f-4b59-8170-523b440ab9d5/frontdoorresults/clifrontdoor000002?api-version=2020-05-01 + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1196' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door backend-pool create + Connection: + - keep-alive + ParameterSetName: + - -f -g -n --address --load-balancing --probe + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdooroperationresults/d0268b12-9f1f-4b59-8170-523b440ab9d5?api-version=2020-05-01 + response: + body: + string: "{\r\n \"status\":\"InProgress\",\"error\":{\r\n \"code\":\"None\",\"message\":null\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '78' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:09:44 GMT + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door backend-pool create + Connection: + - keep-alive + ParameterSetName: + - -f -g -n --address --load-balancing --probe + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdooroperationresults/d0268b12-9f1f-4b59-8170-523b440ab9d5?api-version=2020-05-01 + response: + body: + string: "{\r\n \"status\":\"Succeeded\",\"error\":{\r\n \"code\":\"None\",\"message\":null\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '77' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:10:14 GMT + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door backend-pool create + Connection: + - keep-alive + ParameterSetName: + - -f -g -n --address --load-balancing --probe + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontDoors/clifrontdoor000002?api-version=2020-05-01 + response: + body: + string: "{\r\n \"name\":\"clifrontdoor000002\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002\",\"type\":\"Microsoft.Network/frontdoors\",\"tags\":{\r\n + \ \r\n },\"location\":\"Global\",\"properties\":{\r\n \"provisioningState\":\"Succeeded\",\"resourceState\":\"Enabled\",\"backendPools\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/DefaultBackendPool\",\"name\":\"DefaultBackendPool\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/bkp1\",\"name\":\"bkp1\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n }\r\n ],\"healthProbeSettings\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/HealthProbeSettings/DefaultProbeSettings\",\"name\":\"DefaultProbeSettings\",\"type\":\"Microsoft.Network/Frontdoors/HealthProbeSettings\",\"properties\":{\r\n + \ \"intervalInSeconds\":30,\"path\":\"/\",\"protocol\":\"Https\",\"resourceState\":\"Enabled\",\"enabledState\":\"Enabled\",\"healthProbeMethod\":\"Head\"\r\n + \ }\r\n }\r\n ],\"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/FrontendEndpoints/DefaultFrontendEndpoint\",\"name\":\"DefaultFrontendEndpoint\",\"type\":\"Microsoft.Network/Frontdoors/FrontendEndpoints\",\"properties\":{\r\n + \ \"hostName\":\"clifrontdoor000002.azurefd.net\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":0,\"webApplicationFirewallPolicyLink\":null,\"customHttpsProvisioningState\":null,\"customHttpsProvisioningSubstate\":null,\"customHttpsConfiguration\":null,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"loadBalancingSettings\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/LoadBalancingSettings/DefaultLoadBalancingSettings\",\"name\":\"DefaultLoadBalancingSettings\",\"type\":\"Microsoft.Network/Frontdoors/LoadBalancingSettings\",\"properties\":{\r\n + \ \"additionalLatencyMilliseconds\":0,\"sampleSize\":4,\"successfulSamplesRequired\":2,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"rulesEngines\":[\r\n \r\n ],\"routingRules\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/RoutingRules/DefaultRoutingRule\",\"name\":\"DefaultRoutingRule\",\"type\":\"Microsoft.Network/Frontdoors/RoutingRules\",\"properties\":{\r\n + \ \"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/frontendEndpoints/DefaultFrontendEndpoint\"\r\n + \ }\r\n ],\"acceptedProtocols\":[\r\n \"Http\"\r\n + \ ],\"patternsToMatch\":[\r\n \"/*\"\r\n ],\"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"routeConfiguration\":{\r\n + \ \"@odata.type\":\"#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration\",\"customForwardingPath\":null,\"forwardingProtocol\":\"MatchRequest\",\"cacheConfiguration\":null,\"backendPool\":{\r\n + \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/backendPools/DefaultBackendPool\"\r\n + \ }\r\n },\"rulesEngine\":null,\"webApplicationFirewallPolicyLink\":null\r\n + \ }\r\n }\r\n ],\"backendPoolsSettings\":{\r\n \"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":30\r\n + \ },\"enabledState\":\"Enabled\",\"cName\":\"clifrontdoor000002.azurefd.net\",\"frontdoorId\":\"d9fe5abb-ff39-42b9-87fe-d54202b82e34\",\"friendlyName\":\"clifrontdoor000002\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '6766' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:10:15 GMT + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door backend-pool backend add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --front-door-name --pool-name --address --backend-host-header + --disabled --http-port --https-port --priority --weight + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontDoors/clifrontdoor000002?api-version=2020-05-01 + response: + body: + string: "{\r\n \"name\":\"clifrontdoor000002\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002\",\"type\":\"Microsoft.Network/frontdoors\",\"tags\":{\r\n + \ \r\n },\"location\":\"Global\",\"properties\":{\r\n \"provisioningState\":\"Succeeded\",\"resourceState\":\"Enabled\",\"backendPools\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/DefaultBackendPool\",\"name\":\"DefaultBackendPool\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/bkp1\",\"name\":\"bkp1\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n }\r\n ],\"healthProbeSettings\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/HealthProbeSettings/DefaultProbeSettings\",\"name\":\"DefaultProbeSettings\",\"type\":\"Microsoft.Network/Frontdoors/HealthProbeSettings\",\"properties\":{\r\n + \ \"intervalInSeconds\":30,\"path\":\"/\",\"protocol\":\"Https\",\"resourceState\":\"Enabled\",\"enabledState\":\"Enabled\",\"healthProbeMethod\":\"Head\"\r\n + \ }\r\n }\r\n ],\"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/FrontendEndpoints/DefaultFrontendEndpoint\",\"name\":\"DefaultFrontendEndpoint\",\"type\":\"Microsoft.Network/Frontdoors/FrontendEndpoints\",\"properties\":{\r\n + \ \"hostName\":\"clifrontdoor000002.azurefd.net\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":0,\"webApplicationFirewallPolicyLink\":null,\"customHttpsProvisioningState\":null,\"customHttpsProvisioningSubstate\":null,\"customHttpsConfiguration\":null,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"loadBalancingSettings\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/LoadBalancingSettings/DefaultLoadBalancingSettings\",\"name\":\"DefaultLoadBalancingSettings\",\"type\":\"Microsoft.Network/Frontdoors/LoadBalancingSettings\",\"properties\":{\r\n + \ \"additionalLatencyMilliseconds\":0,\"sampleSize\":4,\"successfulSamplesRequired\":2,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"rulesEngines\":[\r\n \r\n ],\"routingRules\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/RoutingRules/DefaultRoutingRule\",\"name\":\"DefaultRoutingRule\",\"type\":\"Microsoft.Network/Frontdoors/RoutingRules\",\"properties\":{\r\n + \ \"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/frontendEndpoints/DefaultFrontendEndpoint\"\r\n + \ }\r\n ],\"acceptedProtocols\":[\r\n \"Http\"\r\n + \ ],\"patternsToMatch\":[\r\n \"/*\"\r\n ],\"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"routeConfiguration\":{\r\n + \ \"@odata.type\":\"#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration\",\"customForwardingPath\":null,\"forwardingProtocol\":\"MatchRequest\",\"cacheConfiguration\":null,\"backendPool\":{\r\n + \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/backendPools/DefaultBackendPool\"\r\n + \ }\r\n },\"rulesEngine\":null,\"webApplicationFirewallPolicyLink\":null\r\n + \ }\r\n }\r\n ],\"backendPoolsSettings\":{\r\n \"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":30\r\n + \ },\"enabledState\":\"Enabled\",\"cName\":\"clifrontdoor000002.azurefd.net\",\"frontdoorId\":\"d9fe5abb-ff39-42b9-87fe-d54202b82e34\",\"friendlyName\":\"clifrontdoor000002\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '6766' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:10:18 GMT + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"location": "Global", "tags": {}, "properties": {"friendlyName": "clifrontdoor000002", + "routingRules": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/RoutingRules/DefaultRoutingRule", + "name": "DefaultRoutingRule", "properties": {"frontendEndpoints": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/frontendEndpoints/DefaultFrontendEndpoint"}], + "acceptedProtocols": ["Http"], "patternsToMatch": ["/*"], "enabledState": "Enabled", + "routeConfiguration": {"@odata.type": "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration", + "forwardingProtocol": "MatchRequest", "backendPool": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/backendPools/DefaultBackendPool"}}}}], + "loadBalancingSettings": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/LoadBalancingSettings/DefaultLoadBalancingSettings", + "name": "DefaultLoadBalancingSettings", "properties": {"sampleSize": 4, "successfulSamplesRequired": + 2, "additionalLatencyMilliseconds": 0}}], "healthProbeSettings": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/HealthProbeSettings/DefaultProbeSettings", + "name": "DefaultProbeSettings", "properties": {"path": "/", "protocol": "Https", + "intervalInSeconds": 30, "healthProbeMethod": "Head", "enabledState": "Enabled"}}], + "backendPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/DefaultBackendPool", + "name": "DefaultBackendPool", "properties": {"backends": [{"address": "202.120.2.3", + "httpPort": 80, "httpsPort": 443, "enabledState": "Enabled", "priority": 1, + "weight": 50, "backendHostHeader": "202.120.2.3"}], "loadBalancingSettings": + {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings"}, + "healthProbeSettings": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings"}}}, + {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/bkp1", + "name": "bkp1", "properties": {"backends": [{"address": "202.120.2.3", "httpPort": + 80, "httpsPort": 443, "enabledState": "Enabled", "priority": 1, "weight": 50, + "backendHostHeader": "202.120.2.3"}, {"address": "202.120.2.3", "httpPort": + 80, "httpsPort": 443, "enabledState": "Disabled", "priority": 2, "weight": 1, + "backendHostHeader": ""}], "loadBalancingSettings": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings"}, + "healthProbeSettings": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings"}}}], + "frontendEndpoints": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/FrontendEndpoints/DefaultFrontendEndpoint", + "name": "DefaultFrontendEndpoint", "properties": {"hostName": "clifrontdoor000002.azurefd.net", + "sessionAffinityEnabledState": "Disabled", "sessionAffinityTtlSeconds": 0}}], + "backendPoolsSettings": {"enforceCertificateNameCheck": "Enabled", "sendRecvTimeoutSeconds": + 30}, "enabledState": "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door backend-pool backend add + Connection: + - keep-alive + Content-Length: + - '4815' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --front-door-name --pool-name --address --backend-host-header + --disabled --http-port --https-port --priority --weight + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontDoors/clifrontdoor000002?api-version=2020-05-01 + response: + body: + string: "{\r\n \"name\":\"clifrontdoor000002\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002\",\"type\":\"Microsoft.Network/frontdoors\",\"tags\":{\r\n + \ \r\n },\"location\":\"Global\",\"properties\":{\r\n \"provisioningState\":\"Succeeded\",\"resourceState\":\"Enabled\",\"backendPools\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/DefaultBackendPool\",\"name\":\"DefaultBackendPool\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/bkp1\",\"name\":\"bkp1\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ },{\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":2,\"weight\":1,\"backendHostHeader\":\"\",\"enabledState\":\"Disabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n }\r\n ],\"healthProbeSettings\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/HealthProbeSettings/DefaultProbeSettings\",\"name\":\"DefaultProbeSettings\",\"type\":\"Microsoft.Network/Frontdoors/HealthProbeSettings\",\"properties\":{\r\n + \ \"intervalInSeconds\":30,\"path\":\"/\",\"protocol\":\"Https\",\"resourceState\":\"Enabled\",\"enabledState\":\"Enabled\",\"healthProbeMethod\":\"Head\"\r\n + \ }\r\n }\r\n ],\"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/FrontendEndpoints/DefaultFrontendEndpoint\",\"name\":\"DefaultFrontendEndpoint\",\"type\":\"Microsoft.Network/Frontdoors/FrontendEndpoints\",\"properties\":{\r\n + \ \"hostName\":\"clifrontdoor000002.azurefd.net\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":0,\"webApplicationFirewallPolicyLink\":null,\"customHttpsProvisioningState\":null,\"customHttpsProvisioningSubstate\":null,\"customHttpsConfiguration\":null,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"loadBalancingSettings\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/LoadBalancingSettings/DefaultLoadBalancingSettings\",\"name\":\"DefaultLoadBalancingSettings\",\"type\":\"Microsoft.Network/Frontdoors/LoadBalancingSettings\",\"properties\":{\r\n + \ \"additionalLatencyMilliseconds\":0,\"sampleSize\":4,\"successfulSamplesRequired\":2,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"rulesEngines\":[\r\n \r\n ],\"routingRules\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/RoutingRules/DefaultRoutingRule\",\"name\":\"DefaultRoutingRule\",\"type\":\"Microsoft.Network/Frontdoors/RoutingRules\",\"properties\":{\r\n + \ \"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/frontendEndpoints/DefaultFrontendEndpoint\"\r\n + \ }\r\n ],\"acceptedProtocols\":[\r\n \"Http\"\r\n + \ ],\"patternsToMatch\":[\r\n \"/*\"\r\n ],\"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"routeConfiguration\":{\r\n + \ \"@odata.type\":\"#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration\",\"customForwardingPath\":null,\"forwardingProtocol\":\"MatchRequest\",\"cacheConfiguration\":null,\"backendPool\":{\r\n + \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/backendPools/DefaultBackendPool\"\r\n + \ }\r\n },\"rulesEngine\":null,\"webApplicationFirewallPolicyLink\":null\r\n + \ }\r\n }\r\n ],\"backendPoolsSettings\":{\r\n \"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":30\r\n + \ },\"enabledState\":\"Enabled\",\"cName\":\"clifrontdoor000002.azurefd.net\",\"frontdoorId\":\"d9fe5abb-ff39-42b9-87fe-d54202b82e34\",\"friendlyName\":\"clifrontdoor000002\"\r\n + \ }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdooroperationresults/e96d9b32-daa3-45ab-a788-a9cf27cb4f22?api-version=2020-05-01 + cache-control: + - no-cache + content-length: + - '7068' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:10:26 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdooroperationresults/e96d9b32-daa3-45ab-a788-a9cf27cb4f22/frontdoorresults/clifrontdoor000002?api-version=2020-05-01 + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1195' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door backend-pool backend add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --front-door-name --pool-name --address --backend-host-header + --disabled --http-port --https-port --priority --weight + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdooroperationresults/e96d9b32-daa3-45ab-a788-a9cf27cb4f22?api-version=2020-05-01 + response: + body: + string: "{\r\n \"status\":\"InProgress\",\"error\":{\r\n \"code\":\"None\",\"message\":null\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '78' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:10:37 GMT + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door backend-pool backend add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --front-door-name --pool-name --address --backend-host-header + --disabled --http-port --https-port --priority --weight + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdooroperationresults/e96d9b32-daa3-45ab-a788-a9cf27cb4f22?api-version=2020-05-01 + response: + body: + string: "{\r\n \"status\":\"Succeeded\",\"error\":{\r\n \"code\":\"None\",\"message\":null\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '77' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:11:07 GMT + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door backend-pool backend add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --front-door-name --pool-name --address --backend-host-header + --disabled --http-port --https-port --priority --weight + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontDoors/clifrontdoor000002?api-version=2020-05-01 + response: + body: + string: "{\r\n \"name\":\"clifrontdoor000002\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002\",\"type\":\"Microsoft.Network/frontdoors\",\"tags\":{\r\n + \ \r\n },\"location\":\"Global\",\"properties\":{\r\n \"provisioningState\":\"Succeeded\",\"resourceState\":\"Enabled\",\"backendPools\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/DefaultBackendPool\",\"name\":\"DefaultBackendPool\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/bkp1\",\"name\":\"bkp1\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ },{\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":2,\"weight\":1,\"backendHostHeader\":\"\",\"enabledState\":\"Disabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n }\r\n ],\"healthProbeSettings\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/HealthProbeSettings/DefaultProbeSettings\",\"name\":\"DefaultProbeSettings\",\"type\":\"Microsoft.Network/Frontdoors/HealthProbeSettings\",\"properties\":{\r\n + \ \"intervalInSeconds\":30,\"path\":\"/\",\"protocol\":\"Https\",\"resourceState\":\"Enabled\",\"enabledState\":\"Enabled\",\"healthProbeMethod\":\"Head\"\r\n + \ }\r\n }\r\n ],\"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/FrontendEndpoints/DefaultFrontendEndpoint\",\"name\":\"DefaultFrontendEndpoint\",\"type\":\"Microsoft.Network/Frontdoors/FrontendEndpoints\",\"properties\":{\r\n + \ \"hostName\":\"clifrontdoor000002.azurefd.net\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":0,\"webApplicationFirewallPolicyLink\":null,\"customHttpsProvisioningState\":null,\"customHttpsProvisioningSubstate\":null,\"customHttpsConfiguration\":null,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"loadBalancingSettings\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/LoadBalancingSettings/DefaultLoadBalancingSettings\",\"name\":\"DefaultLoadBalancingSettings\",\"type\":\"Microsoft.Network/Frontdoors/LoadBalancingSettings\",\"properties\":{\r\n + \ \"additionalLatencyMilliseconds\":0,\"sampleSize\":4,\"successfulSamplesRequired\":2,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"rulesEngines\":[\r\n \r\n ],\"routingRules\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/RoutingRules/DefaultRoutingRule\",\"name\":\"DefaultRoutingRule\",\"type\":\"Microsoft.Network/Frontdoors/RoutingRules\",\"properties\":{\r\n + \ \"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/frontendEndpoints/DefaultFrontendEndpoint\"\r\n + \ }\r\n ],\"acceptedProtocols\":[\r\n \"Http\"\r\n + \ ],\"patternsToMatch\":[\r\n \"/*\"\r\n ],\"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"routeConfiguration\":{\r\n + \ \"@odata.type\":\"#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration\",\"customForwardingPath\":null,\"forwardingProtocol\":\"MatchRequest\",\"cacheConfiguration\":null,\"backendPool\":{\r\n + \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/backendPools/DefaultBackendPool\"\r\n + \ }\r\n },\"rulesEngine\":null,\"webApplicationFirewallPolicyLink\":null\r\n + \ }\r\n }\r\n ],\"backendPoolsSettings\":{\r\n \"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":30\r\n + \ },\"enabledState\":\"Enabled\",\"cName\":\"clifrontdoor000002.azurefd.net\",\"frontdoorId\":\"d9fe5abb-ff39-42b9-87fe-d54202b82e34\",\"friendlyName\":\"clifrontdoor000002\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '7068' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:11:09 GMT + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door backend-pool backend update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --front-door-name --pool-name --index --disabled + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontDoors/clifrontdoor000002?api-version=2020-05-01 + response: + body: + string: "{\r\n \"name\":\"clifrontdoor000002\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002\",\"type\":\"Microsoft.Network/frontdoors\",\"tags\":{\r\n + \ \r\n },\"location\":\"Global\",\"properties\":{\r\n \"provisioningState\":\"Succeeded\",\"resourceState\":\"Enabled\",\"backendPools\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/DefaultBackendPool\",\"name\":\"DefaultBackendPool\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/bkp1\",\"name\":\"bkp1\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ },{\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":2,\"weight\":1,\"backendHostHeader\":\"\",\"enabledState\":\"Disabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n }\r\n ],\"healthProbeSettings\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/HealthProbeSettings/DefaultProbeSettings\",\"name\":\"DefaultProbeSettings\",\"type\":\"Microsoft.Network/Frontdoors/HealthProbeSettings\",\"properties\":{\r\n + \ \"intervalInSeconds\":30,\"path\":\"/\",\"protocol\":\"Https\",\"resourceState\":\"Enabled\",\"enabledState\":\"Enabled\",\"healthProbeMethod\":\"Head\"\r\n + \ }\r\n }\r\n ],\"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/FrontendEndpoints/DefaultFrontendEndpoint\",\"name\":\"DefaultFrontendEndpoint\",\"type\":\"Microsoft.Network/Frontdoors/FrontendEndpoints\",\"properties\":{\r\n + \ \"hostName\":\"clifrontdoor000002.azurefd.net\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":0,\"webApplicationFirewallPolicyLink\":null,\"customHttpsProvisioningState\":null,\"customHttpsProvisioningSubstate\":null,\"customHttpsConfiguration\":null,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"loadBalancingSettings\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/LoadBalancingSettings/DefaultLoadBalancingSettings\",\"name\":\"DefaultLoadBalancingSettings\",\"type\":\"Microsoft.Network/Frontdoors/LoadBalancingSettings\",\"properties\":{\r\n + \ \"additionalLatencyMilliseconds\":0,\"sampleSize\":4,\"successfulSamplesRequired\":2,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"rulesEngines\":[\r\n \r\n ],\"routingRules\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/RoutingRules/DefaultRoutingRule\",\"name\":\"DefaultRoutingRule\",\"type\":\"Microsoft.Network/Frontdoors/RoutingRules\",\"properties\":{\r\n + \ \"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/frontendEndpoints/DefaultFrontendEndpoint\"\r\n + \ }\r\n ],\"acceptedProtocols\":[\r\n \"Http\"\r\n + \ ],\"patternsToMatch\":[\r\n \"/*\"\r\n ],\"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"routeConfiguration\":{\r\n + \ \"@odata.type\":\"#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration\",\"customForwardingPath\":null,\"forwardingProtocol\":\"MatchRequest\",\"cacheConfiguration\":null,\"backendPool\":{\r\n + \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/backendPools/DefaultBackendPool\"\r\n + \ }\r\n },\"rulesEngine\":null,\"webApplicationFirewallPolicyLink\":null\r\n + \ }\r\n }\r\n ],\"backendPoolsSettings\":{\r\n \"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":30\r\n + \ },\"enabledState\":\"Enabled\",\"cName\":\"clifrontdoor000002.azurefd.net\",\"frontdoorId\":\"d9fe5abb-ff39-42b9-87fe-d54202b82e34\",\"friendlyName\":\"clifrontdoor000002\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '7068' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:11:12 GMT + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"location": "Global", "tags": {}, "properties": {"friendlyName": "clifrontdoor000002", + "routingRules": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/RoutingRules/DefaultRoutingRule", + "name": "DefaultRoutingRule", "properties": {"frontendEndpoints": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/frontendEndpoints/DefaultFrontendEndpoint"}], + "acceptedProtocols": ["Http"], "patternsToMatch": ["/*"], "enabledState": "Enabled", + "routeConfiguration": {"@odata.type": "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration", + "forwardingProtocol": "MatchRequest", "backendPool": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/backendPools/DefaultBackendPool"}}}}], + "loadBalancingSettings": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/LoadBalancingSettings/DefaultLoadBalancingSettings", + "name": "DefaultLoadBalancingSettings", "properties": {"sampleSize": 4, "successfulSamplesRequired": + 2, "additionalLatencyMilliseconds": 0}}], "healthProbeSettings": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/HealthProbeSettings/DefaultProbeSettings", + "name": "DefaultProbeSettings", "properties": {"path": "/", "protocol": "Https", + "intervalInSeconds": 30, "healthProbeMethod": "Head", "enabledState": "Enabled"}}], + "backendPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/DefaultBackendPool", + "name": "DefaultBackendPool", "properties": {"backends": [{"address": "202.120.2.3", + "httpPort": 80, "httpsPort": 443, "enabledState": "Enabled", "priority": 1, + "weight": 50, "backendHostHeader": "202.120.2.3"}], "loadBalancingSettings": + {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings"}, + "healthProbeSettings": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings"}}}, + {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/bkp1", + "name": "bkp1", "properties": {"backends": [{"address": "202.120.2.3", "httpPort": + 80, "httpsPort": 443, "enabledState": "Enabled", "priority": 1, "weight": 50, + "backendHostHeader": "202.120.2.3"}, {"address": "202.120.2.3", "httpPort": + 80, "httpsPort": 443, "enabledState": "Enabled", "priority": 2, "weight": 1, + "backendHostHeader": ""}], "loadBalancingSettings": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings"}, + "healthProbeSettings": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings"}}}], + "frontendEndpoints": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/FrontendEndpoints/DefaultFrontendEndpoint", + "name": "DefaultFrontendEndpoint", "properties": {"hostName": "clifrontdoor000002.azurefd.net", + "sessionAffinityEnabledState": "Disabled", "sessionAffinityTtlSeconds": 0}}], + "backendPoolsSettings": {"enforceCertificateNameCheck": "Enabled", "sendRecvTimeoutSeconds": + 30}, "enabledState": "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door backend-pool backend update + Connection: + - keep-alive + Content-Length: + - '4814' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --front-door-name --pool-name --index --disabled + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontDoors/clifrontdoor000002?api-version=2020-05-01 + response: + body: + string: "{\r\n \"name\":\"clifrontdoor000002\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002\",\"type\":\"Microsoft.Network/frontdoors\",\"tags\":{\r\n + \ \r\n },\"location\":\"Global\",\"properties\":{\r\n \"provisioningState\":\"Succeeded\",\"resourceState\":\"Enabled\",\"backendPools\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/DefaultBackendPool\",\"name\":\"DefaultBackendPool\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/bkp1\",\"name\":\"bkp1\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ },{\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":2,\"weight\":1,\"backendHostHeader\":\"\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n }\r\n ],\"healthProbeSettings\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/HealthProbeSettings/DefaultProbeSettings\",\"name\":\"DefaultProbeSettings\",\"type\":\"Microsoft.Network/Frontdoors/HealthProbeSettings\",\"properties\":{\r\n + \ \"intervalInSeconds\":30,\"path\":\"/\",\"protocol\":\"Https\",\"resourceState\":\"Enabled\",\"enabledState\":\"Enabled\",\"healthProbeMethod\":\"Head\"\r\n + \ }\r\n }\r\n ],\"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/FrontendEndpoints/DefaultFrontendEndpoint\",\"name\":\"DefaultFrontendEndpoint\",\"type\":\"Microsoft.Network/Frontdoors/FrontendEndpoints\",\"properties\":{\r\n + \ \"hostName\":\"clifrontdoor000002.azurefd.net\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":0,\"webApplicationFirewallPolicyLink\":null,\"customHttpsProvisioningState\":null,\"customHttpsProvisioningSubstate\":null,\"customHttpsConfiguration\":null,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"loadBalancingSettings\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/LoadBalancingSettings/DefaultLoadBalancingSettings\",\"name\":\"DefaultLoadBalancingSettings\",\"type\":\"Microsoft.Network/Frontdoors/LoadBalancingSettings\",\"properties\":{\r\n + \ \"additionalLatencyMilliseconds\":0,\"sampleSize\":4,\"successfulSamplesRequired\":2,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"rulesEngines\":[\r\n \r\n ],\"routingRules\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/RoutingRules/DefaultRoutingRule\",\"name\":\"DefaultRoutingRule\",\"type\":\"Microsoft.Network/Frontdoors/RoutingRules\",\"properties\":{\r\n + \ \"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/frontendEndpoints/DefaultFrontendEndpoint\"\r\n + \ }\r\n ],\"acceptedProtocols\":[\r\n \"Http\"\r\n + \ ],\"patternsToMatch\":[\r\n \"/*\"\r\n ],\"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"routeConfiguration\":{\r\n + \ \"@odata.type\":\"#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration\",\"customForwardingPath\":null,\"forwardingProtocol\":\"MatchRequest\",\"cacheConfiguration\":null,\"backendPool\":{\r\n + \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/backendPools/DefaultBackendPool\"\r\n + \ }\r\n },\"rulesEngine\":null,\"webApplicationFirewallPolicyLink\":null\r\n + \ }\r\n }\r\n ],\"backendPoolsSettings\":{\r\n \"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":30\r\n + \ },\"enabledState\":\"Enabled\",\"cName\":\"clifrontdoor000002.azurefd.net\",\"frontdoorId\":\"d9fe5abb-ff39-42b9-87fe-d54202b82e34\",\"friendlyName\":\"clifrontdoor000002\"\r\n + \ }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdooroperationresults/4339ffbb-717a-4cc8-bb3f-8f478c957b33?api-version=2020-05-01 + cache-control: + - no-cache + content-length: + - '7067' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:11:19 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdooroperationresults/4339ffbb-717a-4cc8-bb3f-8f478c957b33/frontdoorresults/clifrontdoor000002?api-version=2020-05-01 + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1195' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door backend-pool backend update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --front-door-name --pool-name --index --disabled + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdooroperationresults/4339ffbb-717a-4cc8-bb3f-8f478c957b33?api-version=2020-05-01 + response: + body: + string: "{\r\n \"status\":\"InProgress\",\"error\":{\r\n \"code\":\"None\",\"message\":null\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '78' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:11:30 GMT + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door backend-pool backend update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --front-door-name --pool-name --index --disabled + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdooroperationresults/4339ffbb-717a-4cc8-bb3f-8f478c957b33?api-version=2020-05-01 + response: + body: + string: "{\r\n \"status\":\"Succeeded\",\"error\":{\r\n \"code\":\"None\",\"message\":null\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '77' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:12:00 GMT + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door backend-pool backend update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --front-door-name --pool-name --index --disabled + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontDoors/clifrontdoor000002?api-version=2020-05-01 + response: + body: + string: "{\r\n \"name\":\"clifrontdoor000002\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002\",\"type\":\"Microsoft.Network/frontdoors\",\"tags\":{\r\n + \ \r\n },\"location\":\"Global\",\"properties\":{\r\n \"provisioningState\":\"Succeeded\",\"resourceState\":\"Enabled\",\"backendPools\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/DefaultBackendPool\",\"name\":\"DefaultBackendPool\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/bkp1\",\"name\":\"bkp1\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ },{\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":2,\"weight\":1,\"backendHostHeader\":\"\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n }\r\n ],\"healthProbeSettings\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/HealthProbeSettings/DefaultProbeSettings\",\"name\":\"DefaultProbeSettings\",\"type\":\"Microsoft.Network/Frontdoors/HealthProbeSettings\",\"properties\":{\r\n + \ \"intervalInSeconds\":30,\"path\":\"/\",\"protocol\":\"Https\",\"resourceState\":\"Enabled\",\"enabledState\":\"Enabled\",\"healthProbeMethod\":\"Head\"\r\n + \ }\r\n }\r\n ],\"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/FrontendEndpoints/DefaultFrontendEndpoint\",\"name\":\"DefaultFrontendEndpoint\",\"type\":\"Microsoft.Network/Frontdoors/FrontendEndpoints\",\"properties\":{\r\n + \ \"hostName\":\"clifrontdoor000002.azurefd.net\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":0,\"webApplicationFirewallPolicyLink\":null,\"customHttpsProvisioningState\":null,\"customHttpsProvisioningSubstate\":null,\"customHttpsConfiguration\":null,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"loadBalancingSettings\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/LoadBalancingSettings/DefaultLoadBalancingSettings\",\"name\":\"DefaultLoadBalancingSettings\",\"type\":\"Microsoft.Network/Frontdoors/LoadBalancingSettings\",\"properties\":{\r\n + \ \"additionalLatencyMilliseconds\":0,\"sampleSize\":4,\"successfulSamplesRequired\":2,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"rulesEngines\":[\r\n \r\n ],\"routingRules\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/RoutingRules/DefaultRoutingRule\",\"name\":\"DefaultRoutingRule\",\"type\":\"Microsoft.Network/Frontdoors/RoutingRules\",\"properties\":{\r\n + \ \"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/frontendEndpoints/DefaultFrontendEndpoint\"\r\n + \ }\r\n ],\"acceptedProtocols\":[\r\n \"Http\"\r\n + \ ],\"patternsToMatch\":[\r\n \"/*\"\r\n ],\"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"routeConfiguration\":{\r\n + \ \"@odata.type\":\"#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration\",\"customForwardingPath\":null,\"forwardingProtocol\":\"MatchRequest\",\"cacheConfiguration\":null,\"backendPool\":{\r\n + \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/backendPools/DefaultBackendPool\"\r\n + \ }\r\n },\"rulesEngine\":null,\"webApplicationFirewallPolicyLink\":null\r\n + \ }\r\n }\r\n ],\"backendPoolsSettings\":{\r\n \"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":30\r\n + \ },\"enabledState\":\"Enabled\",\"cName\":\"clifrontdoor000002.azurefd.net\",\"frontdoorId\":\"d9fe5abb-ff39-42b9-87fe-d54202b82e34\",\"friendlyName\":\"clifrontdoor000002\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '7067' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:12:02 GMT + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network front-door backend-pool backend update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --front-door-name --pool-name --index --disabled + User-Agent: + - AZURECLI/2.23.0 azsdk-python-mgmt-frontdoor/1.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontDoors/clifrontdoor000002?api-version=2020-05-01 + response: + body: + string: "{\r\n \"name\":\"clifrontdoor000002\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002\",\"type\":\"Microsoft.Network/frontdoors\",\"tags\":{\r\n + \ \r\n },\"location\":\"Global\",\"properties\":{\r\n \"provisioningState\":\"Succeeded\",\"resourceState\":\"Enabled\",\"backendPools\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/DefaultBackendPool\",\"name\":\"DefaultBackendPool\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n },{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/BackendPools/bkp1\",\"name\":\"bkp1\",\"type\":\"Microsoft.Network/Frontdoors/BackendPools\",\"properties\":{\r\n + \ \"backends\":[\r\n {\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":1,\"weight\":50,\"backendHostHeader\":\"202.120.2.3\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ },{\r\n \"address\":\"202.120.2.3\",\"httpPort\":80,\"httpsPort\":443,\"priority\":2,\"weight\":1,\"backendHostHeader\":\"\",\"enabledState\":\"Enabled\",\"privateLinkAlias\":null,\"privateEndpointStatus\":null,\"privateLinkApprovalMessage\":null,\"privateLinkResourceId\":null,\"privateLinkLocation\":null\r\n + \ }\r\n ],\"healthProbeSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/healthProbeSettings/DefaultProbeSettings\"\r\n + \ },\"loadBalancingSettings\":{\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/loadBalancingSettings/DefaultLoadBalancingSettings\"\r\n + \ },\"resourceState\":\"Enabled\"\r\n }\r\n }\r\n ],\"healthProbeSettings\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/HealthProbeSettings/DefaultProbeSettings\",\"name\":\"DefaultProbeSettings\",\"type\":\"Microsoft.Network/Frontdoors/HealthProbeSettings\",\"properties\":{\r\n + \ \"intervalInSeconds\":30,\"path\":\"/\",\"protocol\":\"Https\",\"resourceState\":\"Enabled\",\"enabledState\":\"Enabled\",\"healthProbeMethod\":\"Head\"\r\n + \ }\r\n }\r\n ],\"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/FrontendEndpoints/DefaultFrontendEndpoint\",\"name\":\"DefaultFrontendEndpoint\",\"type\":\"Microsoft.Network/Frontdoors/FrontendEndpoints\",\"properties\":{\r\n + \ \"hostName\":\"clifrontdoor000002.azurefd.net\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":0,\"webApplicationFirewallPolicyLink\":null,\"customHttpsProvisioningState\":null,\"customHttpsProvisioningSubstate\":null,\"customHttpsConfiguration\":null,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"loadBalancingSettings\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/LoadBalancingSettings/DefaultLoadBalancingSettings\",\"name\":\"DefaultLoadBalancingSettings\",\"type\":\"Microsoft.Network/Frontdoors/LoadBalancingSettings\",\"properties\":{\r\n + \ \"additionalLatencyMilliseconds\":0,\"sampleSize\":4,\"successfulSamplesRequired\":2,\"resourceState\":\"Enabled\"\r\n + \ }\r\n }\r\n ],\"rulesEngines\":[\r\n \r\n ],\"routingRules\":[\r\n + \ {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Network/Frontdoors/clifrontdoor000002/RoutingRules/DefaultRoutingRule\",\"name\":\"DefaultRoutingRule\",\"type\":\"Microsoft.Network/Frontdoors/RoutingRules\",\"properties\":{\r\n + \ \"frontendEndpoints\":[\r\n {\r\n \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/frontendEndpoints/DefaultFrontendEndpoint\"\r\n + \ }\r\n ],\"acceptedProtocols\":[\r\n \"Http\"\r\n + \ ],\"patternsToMatch\":[\r\n \"/*\"\r\n ],\"enabledState\":\"Enabled\",\"resourceState\":\"Enabled\",\"routeConfiguration\":{\r\n + \ \"@odata.type\":\"#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration\",\"customForwardingPath\":null,\"forwardingProtocol\":\"MatchRequest\",\"cacheConfiguration\":null,\"backendPool\":{\r\n + \ \"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/frontdoors/clifrontdoor000002/backendPools/DefaultBackendPool\"\r\n + \ }\r\n },\"rulesEngine\":null,\"webApplicationFirewallPolicyLink\":null\r\n + \ }\r\n }\r\n ],\"backendPoolsSettings\":{\r\n \"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":30\r\n + \ },\"enabledState\":\"Enabled\",\"cName\":\"clifrontdoor000002.azurefd.net\",\"frontdoorId\":\"d9fe5abb-ff39-42b9-87fe-d54202b82e34\",\"friendlyName\":\"clifrontdoor000002\"\r\n + \ }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '7067' + content-type: + - application/json; odata.metadata=minimal + date: + - Wed, 19 May 2021 03:12:04 GMT + expires: + - '-1' + odata-version: + - '4.0' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/front-door/azext_front_door/tests/latest/recordings/test_front_door_basic_scenario.yaml b/src/front-door/azext_front_door/tests/latest/recordings/test_front_door_basic_scenario.yaml index fc962be9be0..32b8df30236 100644 --- a/src/front-door/azext_front_door/tests/latest/recordings/test_front_door_basic_scenario.yaml +++ b/src/front-door/azext_front_door/tests/latest/recordings/test_front_door_basic_scenario.yaml @@ -354,7 +354,7 @@ interactions: accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azfdtest.xyz/providers/Microsoft.Network/dnsZones/cdne2e.azfdtest.xyz/CNAME/clife000002?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azfdtest.xyz/providers/Microsoft.Network/dnsZones/cdne2e.azfdtest.xyz/cname/clife000002?api-version=2018-05-01 response: body: string: '{"code":"NotFound","message":"The resource record ''clife000002'' does @@ -404,7 +404,7 @@ interactions: accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azfdtest.xyz/providers/Microsoft.Network/dnsZones/cdne2e.azfdtest.xyz/CNAME/clife000002?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azfdtest.xyz/providers/Microsoft.Network/dnsZones/cdne2e.azfdtest.xyz/cname/clife000002?api-version=2018-05-01 response: body: string: '{"id":"\/subscriptions\/00000000-0000-0000-0000-000000000000\/resourceGroups\/azfdtest.xyz\/providers\/Microsoft.Network\/dnszones\/cdne2e.azfdtest.xyz\/CNAME\/clife000002","name":"clife000002","type":"Microsoft.Network\/dnszones\/CNAME","etag":"bd9175a9-254c-4134-8aa2-9d23be6112b0","properties":{"fqdn":"clife000002.cdne2e.azfdtest.xyz.","TTL":3600,"CNAMERecord":{"cname":"clifrontdoor000003.azurefd.net"},"targetResource":{},"provisioningState":"Succeeded"}}' diff --git a/src/front-door/azext_front_door/tests/latest/test_backend_pool_scenarios.py b/src/front-door/azext_front_door/tests/latest/test_backend_pool_scenarios.py index 8ed3201386a..205deaabcd0 100644 --- a/src/front-door/azext_front_door/tests/latest/test_backend_pool_scenarios.py +++ b/src/front-door/azext_front_door/tests/latest/test_backend_pool_scenarios.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer) +from knack.util import CLIError class BackendPoolScenarioTest(ScenarioTest): @@ -37,3 +38,59 @@ def test_backend_pool_basic(self, resource_group): checks=[ self.check('length(@)', 1), ]) + + @ResourceGroupPreparer(location='westus') + def test_backend_pool_backend(self, resource_group): + self.kwargs.update({ + 'front_door': self.create_random_name('clifrontdoor', 20), + 'bkp1': 'bkp1', + 'lb1': 'lb1', + 'pb1': 'pb1' + }) + self.cmd('network front-door create -g {rg} -n {front_door} --backend-address 202.120.2.3') + + self.cmd('network front-door backend-pool create -f {front_door} -g {rg} -n {bkp1} ' + '--address 202.120.2.3 ' + '--load-balancing DefaultLoadBalancingSettings ' + '--probe DefaultProbeSettings ', + checks=[ + self.check('backends[0].address', '202.120.2.3'), + self.check('ends_with(loadBalancingSettings.id, `DefaultLoadBalancingSettings`)', True), + self.check('ends_with(healthProbeSettings.id, `DefaultProbeSettings`)', True) + ]) + + # Fix Issue: https://github.com/Azure/azure-cli/issues/17269 + self.cmd('network front-door backend-pool backend add ' + '--resource-group {rg} ' + '--front-door-name {front_door} ' + '--pool-name {bkp1} ' + '--address 202.120.2.3 ' + '--backend-host-header "" ' + '--disabled true ' + '--http-port 80 ' + '--https-port 443 ' + '--priority 2 ' + '--weight 1 ', + checks=[ + self.check('backendHostHeader', '') + ]) + + # Fix Iussue: https://github.com/Azure/azure-cli/issues/17270 + self.cmd('network front-door backend-pool backend update ' + '--resource-group {rg} ' + '--front-door-name {front_door} ' + '--pool-name {bkp1} ' + '--index 2 ' + '--disabled false ', + checks=[ + self.check('enabledState', 'Enabled'), + self.check('backendHostHeader', '') + ]) + + with self.assertRaises(CLIError): + self.cmd('network front-door backend-pool backend update ' + '--resource-group {rg} ' + '--front-door-name {front_door} ' + '--pool-name {bkp1} ' + '--index 3 ' + '--disabled false ') diff --git a/src/front-door/setup.py b/src/front-door/setup.py index ee8f949dea0..e9da57dd3f2 100644 --- a/src/front-door/setup.py +++ b/src/front-door/setup.py @@ -8,7 +8,7 @@ from codecs import open from setuptools import setup, find_packages -VERSION = "1.0.14" +VERSION = "1.0.15" CLASSIFIERS = [ 'Development Status :: 4 - Beta', diff --git a/src/index.json b/src/index.json index de19ecdce36..1d716a1111d 100644 --- a/src/index.json +++ b/src/index.json @@ -3132,6 +3132,92 @@ "version": "0.5.19" }, "sha256Digest": "ea42777c9a90295667bc3dc2154f3f3c9f122f884fd7dea661d4948d81dc0b63" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/aks_preview-0.5.21-py2.py3-none-any.whl", + "filename": "aks_preview-0.5.21-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.49", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/aks-preview" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "aks-preview", + "summary": "Provides a preview for upcoming AKS features", + "version": "0.5.21" + }, + "sha256Digest": "8035103b7eb04451b596d70d03f7b1685418e6679c143db5cf6ca70d91e65848" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/aks_preview-0.5.22-py2.py3-none-any.whl", + "filename": "aks_preview-0.5.22-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.49", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/aks-preview" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "aks-preview", + "summary": "Provides a preview for upcoming AKS features", + "version": "0.5.22" + }, + "sha256Digest": "d9673c7d1496e2d85d2b15ad1fc7b2e24101517d8714c4a1cc9f86175cf395a2" } ], "alertsmanagement": [ @@ -3912,6 +3998,63 @@ "sha256Digest": "8c3ace89d98781f2e0c952a7197862d0f64afded0c6e8e83f229fea3e014806b" } ], + "arcdata": [ + { + "downloadUrl": "https://azurearcdatacli.blob.core.windows.net/cli-extensions/arcdata-0.0.1-py2.py3-none-any.whl", + "filename": "arcdata-0.0.1-py2.py3-none-any.whl", + "metadata": { + "azext.isExperimental": false, + "azext.minCliCoreVersion": "2.3.1", + "classifiers": [ + "Development Status :: 1 - Beta", + "Intended Audience :: Developers", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "dpgswdist@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://docs.microsoft.com/en-us/sql/sql-server/azure-arc/overview?view=sql-server-ver15" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "license_file": "LICENSE", + "metadata_version": "2.0", + "name": "arcdata", + "run_requires": [ + { + "requires": [ + "jinja2 (==2.10.3)", + "jsonpatch (==1.24)", + "jsonpath-ng (==1.4.3)", + "kubernetes (==11.0.0)", + "pydash (==4.8.0)" + ] + } + ], + "summary": "Tools for managing ArcData.", + "version": "0.0.1" + }, + "sha256Digest": "e727a7bf123aa15b406455f268be8a906907d6d32bd314d122b83d006767adc8" + } + ], "attestation": [ { "downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/attestation-0.1.0-py3-none-any.whl", @@ -5398,6 +5541,59 @@ "version": "0.10.13" }, "sha256Digest": "a4e684dd021306bc1e48ec22243f59a7679aff55174d37401e861b7b595565f5" + }, + { + "downloadUrl": "https://github.com/Azure/azure-iot-cli-extension/releases/download/v0.10.14/azure_iot-0.10.14-py3-none-any.whl", + "filename": "azure_iot-0.10.14-py3-none-any.whl", + "metadata": { + "azext.minCliCoreVersion": "2.17.1", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "iotupx@microsoft.com", + "name": "Microsoft", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/azure/azure-iot-cli-extension" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "azure-iot", + "requires_python": ">=3.6,<4", + "run_requires": [ + { + "requires": [ + "jsonschema (==3.2.0)", + "packaging", + "paho-mqtt (==1.5.0)" + ] + } + ], + "summary": "The Azure IoT extension for Azure CLI.", + "version": "0.10.14" + }, + "sha256Digest": "91ed29b19a26e61414cfcc65291ee046b2be01fae55878d5475d7f86809b903c" } ], "baremetal-infrastructure": [ @@ -6205,6 +6401,49 @@ "version": "0.1.0" }, "sha256Digest": "4a6ffd3d10898183b66b0933064bc6d9bbade0e9af32be3348412b75310e07cb" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/confluent-0.2.0-py3-none-any.whl", + "filename": "confluent-0.2.0-py3-none-any.whl", + "metadata": { + "azext.isExperimental": true, + "azext.minCliCoreVersion": "2.17.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/confluent" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "confluent", + "summary": "Microsoft Azure Command-Line Tools ConfluentManagementClient Extension", + "version": "0.2.0" + }, + "sha256Digest": "edf3b0d4afc36a3aaa9f68723f1db8b26bedcb5a5abcb053556146e4604cf31a" } ], "connectedk8s": [ @@ -8632,6 +8871,48 @@ "version": "0.3.0" }, "sha256Digest": "0d68e01c4b7ef9ce6ccf7f2594f3faf19600dbb8ec7d395bc9ad4b4bdab8a245" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/datafactory-0.4.0-py3-none-any.whl", + "filename": "datafactory-0.4.0-py3-none-any.whl", + "metadata": { + "azext.minCliCoreVersion": "2.15.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/datafactory" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "datafactory", + "summary": "Microsoft Azure Command-Line Tools DataFactoryManagementClient Extension", + "version": "0.4.0" + }, + "sha256Digest": "95c6024d8fd35fca5280de274660abb3f249af868c6f5b75c3581df536ff4a13" } ], "dataprotection": [ @@ -9378,8 +9659,51 @@ ], "diskpool": [ { - "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/diskpool-0.1.0-py3-none-any.whl", - "filename": "diskpool-0.1.0-py3-none-any.whl", + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/diskpool-0.1.0-py3-none-any.whl", + "filename": "diskpool-0.1.0-py3-none-any.whl", + "metadata": { + "azext.isExperimental": true, + "azext.minCliCoreVersion": "2.15.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/diskpool" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "diskpool", + "summary": "Microsoft Azure Command-Line Tools StoragePoolManagement Extension", + "version": "0.1.0" + }, + "sha256Digest": "2afc595664b0fc616e62f8de28cebbca72d8f27dff02a8ed8cfff58dd62d571f" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/diskpool-0.1.1-py3-none-any.whl", + "filename": "diskpool-0.1.1-py3-none-any.whl", "metadata": { "azext.isExperimental": true, "azext.minCliCoreVersion": "2.15.0", @@ -9416,13 +9740,13 @@ "metadata_version": "2.0", "name": "diskpool", "summary": "Microsoft Azure Command-Line Tools StoragePoolManagement Extension", - "version": "0.1.0" + "version": "0.1.1" }, - "sha256Digest": "2afc595664b0fc616e62f8de28cebbca72d8f27dff02a8ed8cfff58dd62d571f" + "sha256Digest": "d65e6f09c39461b78f052eec22eaf239b1d988aa63f3927470b74d28d0b2f95b" }, { - "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/diskpool-0.1.1-py3-none-any.whl", - "filename": "diskpool-0.1.1-py3-none-any.whl", + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/diskpool-0.1.2-py3-none-any.whl", + "filename": "diskpool-0.1.2-py3-none-any.whl", "metadata": { "azext.isExperimental": true, "azext.minCliCoreVersion": "2.15.0", @@ -9459,9 +9783,9 @@ "metadata_version": "2.0", "name": "diskpool", "summary": "Microsoft Azure Command-Line Tools StoragePoolManagement Extension", - "version": "0.1.1" + "version": "0.1.2" }, - "sha256Digest": "d65e6f09c39461b78f052eec22eaf239b1d988aa63f3927470b74d28d0b2f95b" + "sha256Digest": "3ffe1291c8c7132a9caf77e66105027ae8a980c92ad757b0195c3f51090c3e6a" } ], "dms-preview": [ @@ -9689,6 +10013,49 @@ "version": "0.1.0" }, "sha256Digest": "5398ed171b49fe0d27307caec0f6bf2f6310da0b877b5f3b6d8a0fd6e7f50cbe" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/dnc-0.1.1-py3-none-any.whl", + "filename": "dnc-0.1.1-py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.15.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/dnc" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "dnc", + "summary": "Microsoft Azure Command-Line Tools DNC Extension", + "version": "0.1.1" + }, + "sha256Digest": "7d34527aec383a227d1183eea2ecb9d9aaa0642acf9ef206c2f3e6aab72d86b3" } ], "eventgrid": [ @@ -10562,6 +10929,48 @@ "version": "1.0.14" }, "sha256Digest": "bca02f32e3a322de8cf29be1a2c255897ede3a34ee620dcc1871f1dbb6019ff1" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/front_door-1.0.15-py3-none-any.whl", + "filename": "front_door-1.0.15-py3-none-any.whl", + "metadata": { + "azext.minCliCoreVersion": "2.0.68", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/front-door" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "front-door", + "summary": "Manage networking Front Doors.", + "version": "1.0.15" + }, + "sha256Digest": "8673a26f16f0d5b96f217d69f1f2c7588105c56c7e5e53c9a1f6f36b7d9edcff" } ], "fzf": [ @@ -12280,6 +12689,57 @@ "version": "0.4.3" }, "sha256Digest": "67dc73f1e12d5e0084963a73c4a8f4e3adc06785f3ab51c5e0ee1f801fbca0d4" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/k8s_extension-0.5.0-py3-none-any.whl", + "filename": "k8s_extension-0.5.0-py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.24.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "k8s-extension", + "run_requires": [ + { + "requires": [ + "pyhelm" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools K8s-extension Extension", + "version": "0.5.0" + }, + "sha256Digest": "82bb4f809cc5b6fe6b998e78adf6ca3b5b50de02f998c180441d9d66e7cc4875" } ], "k8sconfiguration": [ @@ -13874,6 +14334,56 @@ "version": "2.0.1a2" }, "sha256Digest": "b17126a35dd3ebb65cbe54fe2d69fc9274b37ec5a150ea084b1b343b7393ccde" + }, + { + "downloadUrl": "https://azuremlsdktestpypi.blob.core.windows.net/wheels/sdk-cli-v2-public/ml-2.0.1a3-py3-none-any.whl", + "filename": "ml-2.0.1a3-py3-none-any.whl", + "metadata": { + "azext.isExperimental": true, + "azext.minCliCoreVersion": "2.15.0", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/machinelearningservices" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "ml", + "run_requires": [ + { + "requires": [ + "azure-identity", + "azure-storage-blob (<=12.5.0,>12.0.0b4)", + "azure-storage-file-share (==12.3.0)", + "cryptography (<=3.3.2)", + "docker (>=4.0.0,~=5.0.0)", + "isodate", + "marshmallow (<4.0.0,>=3.5)", + "pathspec (==0.8.*)", + "pydash (<=4.9.0)", + "pyjwt (<2.0.0)", + "tqdm" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools AzureMachineLearningWorkspaces Extension", + "version": "2.0.1a3" + }, + "sha256Digest": "67c57c5c73d7ebaa99d1df52ba82c7a551bf61a182b4888128e8c62c896cf84b" } ], "monitor-control-service": [ @@ -17093,6 +17603,49 @@ "version": "2.5.1" }, "sha256Digest": "a0a28e6eea330f55f5dce630a4ddbbcc9f6f4d800a3e0fc3eeaf1bf2bb7db095" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/spring_cloud-2.6.0-py3-none-any.whl", + "filename": "spring_cloud-2.6.0-py3-none-any.whl", + "metadata": { + "azext.isPreview": false, + "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/spring-cloud" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "spring-cloud", + "summary": "Microsoft Azure Command-Line Tools spring-cloud Extension", + "version": "2.6.0" + }, + "sha256Digest": "a3f685cd0166cabb4e289aba399045399fb2fdc3d691f05cd5d8e9000031b434" } ], "ssh": [ @@ -19838,6 +20391,39 @@ "version": "2.0.1" }, "sha256Digest": "9201be5570c050b7f048f25b70ee0a2229bf73ad048aea036b484166631bc8e5" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/vmware-3.0.0-py2.py3-none-any.whl", + "filename": "vmware-3.0.0-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": false, + "azext.minCliCoreVersion": "2.11.0", + "description_content_type": "text/markdown", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/az-vmware-cli" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "vmware", + "summary": "Azure VMware Solution commands.", + "version": "3.0.0" + }, + "sha256Digest": "d68bcb114a2b46860eecf0debeb0d9c5db46c069399ef9e3f5292220a3cd37c2" } ], "webapp": [ diff --git a/src/k8s-extension/HISTORY.rst b/src/k8s-extension/HISTORY.rst index 49a2338acca..bfa65dac229 100644 --- a/src/k8s-extension/HISTORY.rst +++ b/src/k8s-extension/HISTORY.rst @@ -3,9 +3,9 @@ Release History =============== -0.6.0 +0.5.1 ++++++++++++++++++ -* Switch to api-version 2021-05-01-preview +* Remove pyhelm dependency 0.5.0 ++++++++++++++++++ diff --git a/src/k8s-extension/azext_k8s_extension/partner_extensions/OpenServiceMesh.py b/src/k8s-extension/azext_k8s_extension/partner_extensions/OpenServiceMesh.py index cafd5fb3135..6fdb8306be2 100644 --- a/src/k8s-extension/azext_k8s_extension/partner_extensions/OpenServiceMesh.py +++ b/src/k8s-extension/azext_k8s_extension/partner_extensions/OpenServiceMesh.py @@ -12,8 +12,6 @@ from azure.cli.core.azclierror import InvalidArgumentValueError, RequiredArgumentMissingError from azure.cli.core.commands.client_factory import get_subscription_id -from pyhelm.chartbuilder import ChartBuilder -from pyhelm.repo import VersionError from packaging import version import yaml @@ -68,7 +66,7 @@ def Create(self, cmd, client, resource_group_name, cluster_name, name, cluster_t # NOTE-2: Return a valid Extension object, Instance name and flag for Identity create_identity = False - _validate_tested_distro(cmd, resource_group_name, cluster_name, version) + # _validate_tested_distro(cmd, resource_group_name, cluster_name, version) extension_instance = Extension( extension_type=extension_type, @@ -106,58 +104,58 @@ def Delete(self, client, resource_group_name, cluster_name, name, cluster_type): pass -def _validate_tested_distro(cmd, cluster_resource_group_name, cluster_name, extension_version): +# def _validate_tested_distro(cmd, cluster_resource_group_name, cluster_name, extension_version): - field_unavailable_error = '\"testedDistros\" field unavailable for version {0} of microsoft.openservicemesh, ' \ - 'cannot determine if this Kubernetes distribution has been properly tested'.format(extension_version) +# field_unavailable_error = '\"testedDistros\" field unavailable for version {0} of microsoft.openservicemesh, ' \ +# 'cannot determine if this Kubernetes distribution has been properly tested'.format(extension_version) - if version.parse(str(extension_version)) <= version.parse("0.8.3"): - logger.warning(field_unavailable_error) - return +# if version.parse(str(extension_version)) <= version.parse("0.8.3"): +# logger.warning(field_unavailable_error) +# return - subscription_id = get_subscription_id(cmd.cli_ctx) - resources = cf_resources(cmd.cli_ctx, subscription_id) +# subscription_id = get_subscription_id(cmd.cli_ctx) +# resources = cf_resources(cmd.cli_ctx, subscription_id) - cluster_resource_id = '/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Kubernetes' \ - '/connectedClusters/{2}'.format(subscription_id, cluster_resource_group_name, cluster_name) +# cluster_resource_id = '/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Kubernetes' \ +# '/connectedClusters/{2}'.format(subscription_id, cluster_resource_group_name, cluster_name) - resource = resources.get_by_id(cluster_resource_id, '2020-01-01-preview') - cluster_distro = resource.properties['distribution'].lower() +# resource = resources.get_by_id(cluster_resource_id, '2020-01-01-preview') +# cluster_distro = resource.properties['distribution'].lower() - if cluster_distro == "general": - logger.warning('Unable to determine if distro has been tested for microsoft.openservicemesh, ' - 'kubernetes distro: \"general\"') - return +# if cluster_distro == "general": +# logger.warning('Unable to determine if distro has been tested for microsoft.openservicemesh, ' +# 'kubernetes distro: \"general\"') +# return - tested_distros = _get_tested_distros(extension_version) +# tested_distros = _get_tested_distros(extension_version) - if tested_distros is None: - logger.warning(field_unavailable_error) - elif cluster_distro not in tested_distros.split(): - logger.warning('Untested kubernetes distro for microsoft.openservicemesh, Kubernetes distro is %s', - cluster_distro) +# if tested_distros is None: +# logger.warning(field_unavailable_error) +# elif cluster_distro not in tested_distros.split(): +# logger.warning('Untested kubernetes distro for microsoft.openservicemesh, Kubernetes distro is %s', +# cluster_distro) -def _get_tested_distros(chart_version): +# def _get_tested_distros(chart_version): - try: - chart_arc = ChartBuilder({ - "name": OpenServiceMesh.CHART_NAME, - "version": str(chart_version), - "source": { - "type": "repo", - "location": OpenServiceMesh.CHART_LOCATION - } - }) - except VersionError: - raise InvalidArgumentValueError( - "Invalid version '{}' for microsoft.openservicemesh".format(chart_version) - ) +# try: +# chart_arc = ChartBuilder({ +# "name": OpenServiceMesh.CHART_NAME, +# "version": str(chart_version), +# "source": { +# "type": "repo", +# "location": OpenServiceMesh.CHART_LOCATION +# } +# }) +# except VersionError: +# raise InvalidArgumentValueError( +# "Invalid version '{}' for microsoft.openservicemesh".format(chart_version) +# ) - values = chart_arc.get_values() - values_yaml = yaml.load(values.raw, Loader=yaml.FullLoader) +# values = chart_arc.get_values() +# values_yaml = yaml.load(values.raw, Loader=yaml.FullLoader) - try: - return values_yaml['OpenServiceMesh']['testedDistros'] - except KeyError: - return None +# try: +# return values_yaml['OpenServiceMesh']['testedDistros'] +# except KeyError: +# return None diff --git a/src/k8s-extension/azext_k8s_extension/tests/latest/test_open_service_mesh.py b/src/k8s-extension/azext_k8s_extension/tests/latest/test_open_service_mesh.py index 72e94a06831..61b774045ce 100644 --- a/src/k8s-extension/azext_k8s_extension/tests/latest/test_open_service_mesh.py +++ b/src/k8s-extension/azext_k8s_extension/tests/latest/test_open_service_mesh.py @@ -9,14 +9,15 @@ import unittest from azure.cli.core.azclierror import InvalidArgumentValueError -from azext_k8s_extension.partner_extensions.OpenServiceMesh import _get_tested_distros +# from azext_k8s_extension.partner_extensions.OpenServiceMesh import _get_tested_distros TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) class TestOpenServiceMesh(unittest.TestCase): def test_bad_osm_arc_version(self): - version = "0.7.1" - err = "Invalid version \'" + str(version) + "\' for microsoft.openservicemesh" - with self.assertRaises(InvalidArgumentValueError) as argError: - _get_tested_distros(version) - self.assertEqual(str(argError.exception), err) + # version = "0.7.1" + # err = "Invalid version \'" + str(version) + "\' for microsoft.openservicemesh" + # with self.assertRaises(InvalidArgumentValueError) as argError: + # _get_tested_distros(version) + # self.assertEqual(str(argError.exception), err) + pass diff --git a/src/k8s-extension/setup.py b/src/k8s-extension/setup.py index a8400af15cc..a9a7f60fbaa 100644 --- a/src/k8s-extension/setup.py +++ b/src/k8s-extension/setup.py @@ -30,11 +30,9 @@ ] # TODO: Add any additional SDK dependencies here -DEPENDENCIES = [ - 'pyhelm' -] +DEPENDENCIES = [] -VERSION = "0.5.0" +VERSION = "0.5.1" with open('README.rst', 'r', encoding='utf-8') as f: README = f.read() diff --git a/src/quantum/azext_quantum/commands.py b/src/quantum/azext_quantum/commands.py index 8dba4d30994..b99e711e29c 100644 --- a/src/quantum/azext_quantum/commands.py +++ b/src/quantum/azext_quantum/commands.py @@ -64,7 +64,7 @@ def one(key, value): return OrderedDict([ ('Result', key), ('Frequency', f"{value:10.8f}"), - ('', f"\u2590{barra:<22} |"), + ('', f"\u007C{barra:^20}\u007C") ]) if 'Histogram' in results: diff --git a/src/quantum/azext_quantum/operations/job.py b/src/quantum/azext_quantum/operations/job.py index 97cedc129a1..776f7c51bf0 100644 --- a/src/quantum/azext_quantum/operations/job.py +++ b/src/quantum/azext_quantum/operations/job.py @@ -186,16 +186,15 @@ def output(cmd, job_id, resource_group_name=None, workspace_name=None, location= from azure.cli.command_modules.storage._client_factory import blob_data_service_factory path = os.path.join(tempfile.gettempdir(), job_id) + info = WorkspaceInfo(cmd, resource_group_name, workspace_name, location) + client = cf_jobs(cmd.cli_ctx, info.subscription, info.resource_group, info.name, info.location) + job = client.get(job_id) if os.path.exists(path): logger.debug("Using existing blob from %s", path) else: logger.debug("Downloading job results blob into %s", path) - info = WorkspaceInfo(cmd, resource_group_name, workspace_name, location) - client = cf_jobs(cmd.cli_ctx, info.subscription, info.resource_group, info.name, info.location) - job = client.get(job_id) - if job.status != "Succeeded": return f"Job status: {job.status}. Output only available if Succeeded." @@ -204,7 +203,22 @@ def output(cmd, job_id, resource_group_name=None, workspace_name=None, location= blob_service.get_blob_to_path(args['container'], args['blob'], path) with open(path) as json_file: - data = json.load(json_file) + if job.target.startswith("microsoft.simulator"): + + lines = [line.strip() for line in json_file.readlines()] + result_start_line = len(lines) - 1 + if lines[-1].endswith('"'): + while not lines[result_start_line].startswith('"'): + result_start_line -= 1 + + print('\n'.join(lines[:result_start_line])) + result = ' '.join(lines[result_start_line:])[1:-1] # seems the cleanest version to display + print("_" * len(result) + "\n") + + json_string = "{ \"histogram\" : { \"" + result + "\" : 1 } }" + data = json.loads(json_string) + else: + data = json.load(json_file) return data diff --git a/src/spring-cloud/HISTORY.md b/src/spring-cloud/HISTORY.md index a9dd04acf39..7b4d10f8318 100644 --- a/src/spring-cloud/HISTORY.md +++ b/src/spring-cloud/HISTORY.md @@ -1,8 +1,13 @@ Release History =============== + +2.6.0 +----- +* Add support for 0.5 core, 512 Mi resource requests in app deployment + 2.5.1 ----- -* Revert `2.5.0` as a quick fix for incompatibility with old api-version. +* Revert `2.5.0` as a quick fix for incompatibility with old api-version. ~~2.5.0~~ ----- diff --git a/src/spring-cloud/azext_spring_cloud/_client_factory.py b/src/spring-cloud/azext_spring_cloud/_client_factory.py index 3e99cbb1e32..90b0fbb4ec4 100644 --- a/src/spring-cloud/azext_spring_cloud/_client_factory.py +++ b/src/spring-cloud/azext_spring_cloud/_client_factory.py @@ -1,49 +1,58 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- -from azure.cli.core.commands.client_factory import get_mgmt_service_client -from azure.cli.core.profiles import ResourceType -from .vendored_sdks.appplatform.v2020_07_01 import AppPlatformManagementClient -from .vendored_sdks.appplatform.v2020_11_01_preview import AppPlatformManagementClient as AppPlatformManagementClient_20201101preview - - -def cf_spring_cloud(cli_ctx, *_): - return get_mgmt_service_client(cli_ctx, AppPlatformManagementClient) - - -def cf_spring_cloud_20201101preview(cli_ctx, *_): - return get_mgmt_service_client(cli_ctx, AppPlatformManagementClient_20201101preview) - - -def cf_resource_groups(cli_ctx, subscription_id=None): - return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES, - subscription_id=subscription_id).resource_groups - - -def cf_app_services(cli_ctx, *_): - return cf_spring_cloud(cli_ctx).services - - -def cf_apps(cli_ctx, *_): - return cf_spring_cloud(cli_ctx).apps - - -def cf_deployments(cli_ctx, *_): - return cf_spring_cloud(cli_ctx).deployments - - -def cf_bindings(cli_ctx, *_): - return cf_spring_cloud(cli_ctx).bindings - - -def cf_config_servers(cli_ctx, *_): - return cf_spring_cloud(cli_ctx).config_servers - - -def cf_certificates(cli_ctx, *_): - return cf_spring_cloud(cli_ctx).certificates - - -def cf_custom_domains(cli_ctx, *_): - return cf_spring_cloud(cli_ctx).custom_domains +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +from azure.cli.core.commands.client_factory import get_mgmt_service_client +from azure.cli.core.profiles import ResourceType +from .vendored_sdks.appplatform.v2020_07_01 import AppPlatformManagementClient +from .vendored_sdks.appplatform.v2020_11_01_preview import ( + AppPlatformManagementClient as AppPlatformManagementClient_20201101preview +) +from .vendored_sdks.appplatform.v2021_06_01_preview import ( + AppPlatformManagementClient as AppPlatformManagementClient_20210601preview +) + + +def cf_spring_cloud(cli_ctx, *_): + return get_mgmt_service_client(cli_ctx, AppPlatformManagementClient) + + +def cf_spring_cloud_20201101preview(cli_ctx, *_): + return get_mgmt_service_client(cli_ctx, AppPlatformManagementClient_20201101preview) + + +def cf_spring_cloud_20210601preview(cli_ctx, *_): + return get_mgmt_service_client(cli_ctx, AppPlatformManagementClient_20210601preview) + + +def cf_resource_groups(cli_ctx, subscription_id=None): + return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES, + subscription_id=subscription_id).resource_groups + + +def cf_app_services(cli_ctx, *_): + return cf_spring_cloud(cli_ctx).services + + +def cf_apps(cli_ctx, *_): + return cf_spring_cloud(cli_ctx).apps + + +def cf_deployments(cli_ctx, *_): + return cf_spring_cloud(cli_ctx).deployments + + +def cf_bindings(cli_ctx, *_): + return cf_spring_cloud(cli_ctx).bindings + + +def cf_config_servers(cli_ctx, *_): + return cf_spring_cloud(cli_ctx).config_servers + + +def cf_certificates(cli_ctx, *_): + return cf_spring_cloud(cli_ctx).certificates + + +def cf_custom_domains(cli_ctx, *_): + return cf_spring_cloud(cli_ctx).custom_domains diff --git a/src/spring-cloud/azext_spring_cloud/_params.py b/src/spring-cloud/azext_spring_cloud/_params.py index 6e441130fb1..426798fba89 100644 --- a/src/spring-cloud/azext_spring_cloud/_params.py +++ b/src/spring-cloud/azext_spring_cloud/_params.py @@ -79,10 +79,10 @@ def load_arguments(self, _): options_list=['--assign-endpoint', c.deprecate(target='--is-public', redirect='--assign-endpoint', hide=True)]) c.argument('assign_identity', arg_type=get_three_state_flag(), help='If true, assign managed service identity.') - c.argument('cpu', type=int, default=1, - help='Number of virtual cpu cores per instance.') - c.argument('memory', type=int, default=1, - help='Number of GB of memory per instance.') + c.argument('cpu', type=str, default="1", + help='CPU resource quantity. Should be 500m or number of CPU cores.') + c.argument('memory', type=str, default="1Gi", + help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.') c.argument('instance_count', type=int, default=1, help='Number of instance.', validator=validate_instance_count) @@ -140,8 +140,8 @@ def prepare_logs_argument(c): c.argument('env', env_type) with self.argument_context('spring-cloud app scale') as c: - c.argument('cpu', type=int, help='Number of virtual cpu cores per instance.') - c.argument('memory', type=int, help='Number of GB of memory per instance.') + c.argument('cpu', type=str, help='CPU resource quantity. Should be 500m or number of CPU cores.') + c.argument('memory', type=str, help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.') c.argument('instance_count', type=int, help='Number of instance.', validator=validate_instance_count) for scope in ['spring-cloud app deploy', 'spring-cloud app deployment create']: @@ -160,8 +160,8 @@ def prepare_logs_argument(c): with self.argument_context('spring-cloud app deployment create') as c: c.argument('skip_clone_settings', help='Create staging deployment will automatically copy settings from production deployment.', action='store_true') - c.argument('cpu', type=int, help='Number of virtual cpu cores per instance.') - c.argument('memory', type=int, help='Number of GB of memory per instance.') + c.argument('cpu', type=str, help='CPU resource quantity. Should be 500m or number of CPU cores.') + c.argument('memory', type=str, help='Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.') c.argument('instance_count', type=int, help='Number of instance.', validator=validate_instance_count) with self.argument_context('spring-cloud app deployment') as c: diff --git a/src/spring-cloud/azext_spring_cloud/_resource_quantity.py b/src/spring-cloud/azext_spring_cloud/_resource_quantity.py new file mode 100644 index 00000000000..128f58ebf61 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/_resource_quantity.py @@ -0,0 +1,54 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +import re +from knack.log import get_logger +from azure.cli.core.azclierror import InvalidArgumentValueError + + +logger = get_logger(__name__) + + +def validate_cpu(cpu): + ''' + CPU quantity should be either integer, or millis. Currently, 500m (aka 0.5) is the only allowed fractional value. + Note that 1 can be represented as 1000m. + ''' + if cpu is None: + return None + + # some digit(s) followed by an optional m + if not re.match(r"^\d+m?$", cpu): + raise InvalidArgumentValueError("CPU quantity should be millis (500m) or integer (1, 2, ...)") + + return cpu + + +def validate_memory(memory): + ''' + Memory quantity should be in gigabytes (Gi) or megabytes (Mi). Currently, the only allowed fractional gigabytes + quantity is 512Mi. Note that 1Gi can be specified with 1024Mi. + + In the legacy extension, gigabytes is specified with integer. This will generate a warning now. + ''' + if memory is None: + return None + + unified = memory + try: + # For backward compatibility, convert integer value to value with Gi unit + int(memory) + logger.warning("Memory quantity [--memory] should be specified with unit, such as 512Mi, 1Gi. " + "Support for integer quantity will be dropped in future release.") + unified = memory + "Gi" + except ValueError: + pass + + # Some digit(s) followed by explicit unit (Mi or Gi) + if not re.match(r"^\d+[MG]i$", unified): + raise InvalidArgumentValueError("Memory quantity should be integer followed by unit (Mi/Gi)") + + return unified diff --git a/src/spring-cloud/azext_spring_cloud/commands.py b/src/spring-cloud/azext_spring_cloud/commands.py index d0c05339a16..ef61aed689c 100644 --- a/src/spring-cloud/azext_spring_cloud/commands.py +++ b/src/spring-cloud/azext_spring_cloud/commands.py @@ -4,7 +4,12 @@ # -------------------------------------------------------------------------------------------- # pylint: disable=line-too-long -from ._client_factory import (cf_app_services, cf_spring_cloud, cf_spring_cloud_20201101preview, cf_bindings, cf_config_servers) +from ._client_factory import (cf_app_services, + cf_spring_cloud, + cf_spring_cloud_20201101preview, + cf_spring_cloud_20210601preview, + cf_bindings, + cf_config_servers) from ._transformers import (transform_spring_cloud_table_output, transform_app_table_output, transform_spring_cloud_deployment_output, @@ -40,7 +45,7 @@ def load_command_table(self, _): g.custom_command('repo update', 'config_repo_update') g.custom_command('repo list', 'config_repo_list') - with self.command_group('spring-cloud app', client_factory=cf_spring_cloud_20201101preview) as g: + with self.command_group('spring-cloud app', client_factory=cf_spring_cloud_20210601preview) as g: g.custom_command('create', 'app_create') g.custom_command('update', 'app_update') g.custom_command('deploy', 'app_deploy', supports_no_wait=True) @@ -69,7 +74,7 @@ def load_command_table(self, _): deprecate_info=g.deprecate(redirect='az spring-cloud app logs', hide=True)) as g: g.custom_command('tail', 'app_tail_log') - with self.command_group('spring-cloud app deployment', client_factory=cf_spring_cloud) as g: + with self.command_group('spring-cloud app deployment', client_factory=cf_spring_cloud_20210601preview) as g: g.custom_command('create', 'deployment_create', supports_no_wait=True) g.custom_command('list', 'deployment_list', table_transformer=transform_spring_cloud_deployment_output) diff --git a/src/spring-cloud/azext_spring_cloud/custom.py b/src/spring-cloud/azext_spring_cloud/custom.py index 974f5af3dda..c5dce3dafd0 100644 --- a/src/spring-cloud/azext_spring_cloud/custom.py +++ b/src/spring-cloud/azext_spring_cloud/custom.py @@ -16,6 +16,7 @@ from knack.util import CLIError from .vendored_sdks.appplatform.v2020_07_01 import models from .vendored_sdks.appplatform.v2020_11_01_preview import models as models_20201101preview +from .vendored_sdks.appplatform.v2021_06_01_preview import models as models_20210601preview from .vendored_sdks.appplatform.v2020_07_01.models import _app_platform_management_client_enums as AppPlatformEnums from .vendored_sdks.appplatform.v2020_11_01_preview import ( AppPlatformManagementClient as AppPlatformManagementClient_20201101preview @@ -31,6 +32,7 @@ from azure.cli.core.commands import cached_put from ._utils import _get_rg_location from ._utils import _get_sku_name +from ._resource_quantity import validate_cpu, validate_memory from six.moves.urllib import parse from threading import Thread from threading import Timer @@ -224,60 +226,66 @@ def app_create(cmd, client, resource_group, service, name, env=None, enable_persistent_storage=None, assign_identity=None): + cpu = validate_cpu(cpu) + memory = validate_memory(memory) apps = _get_all_apps(client, resource_group, service) if name in apps: raise CLIError("App '{}' already exists.".format(name)) logger.warning("[1/4] Creating app with name '{}'".format(name)) - properties = models.AppResourceProperties() - properties.temporary_disk = models.TemporaryDisk( + properties = models_20210601preview.AppResourceProperties() + properties.temporary_disk = models_20210601preview.TemporaryDisk( size_in_gb=5, mount_path="/tmp") resource = client.services.get(resource_group, service) _validate_instance_count(resource.sku.tier, instance_count) - app_resource = models.AppResource() + app_resource = models_20210601preview.AppResource() app_resource.properties = properties app_resource.location = resource.location if assign_identity is True: - app_resource.identity = models.ManagedIdentityProperties(type="systemassigned") + app_resource.identity = models_20210601preview.ManagedIdentityProperties(type="systemassigned") poller = client.apps.create_or_update( resource_group, service, name, app_resource) while poller.done() is False: sleep(APP_CREATE_OR_UPDATE_SLEEP_INTERVAL) - deployment_settings = models.DeploymentSettings( - cpu=cpu, - memory_in_gb=memory, + resource_requests = models_20210601preview.ResourceRequests(cpu=cpu, memory=memory) + + deployment_settings = models_20210601preview.DeploymentSettings( + resource_requests=resource_requests, environment_variables=env, jvm_options=jvm_options, net_core_main_entry_path=None, runtime_version=runtime_version) + deployment_settings.cpu = None + deployment_settings.memory_in_gb = None file_type = "NetCoreZip" if runtime_version == AppPlatformEnums.RuntimeVersion.net_core_31 else "Jar" - user_source_info = models.UserSourceInfo( + user_source_info = models_20210601preview.UserSourceInfo( relative_path='', type=file_type) - properties = models.DeploymentResourceProperties( + properties = models_20210601preview.DeploymentResourceProperties( deployment_settings=deployment_settings, source=user_source_info) # create default deployment logger.warning( "[2/4] Creating default deployment with name '{}'".format(DEFAULT_DEPLOYMENT_NAME)) + sku = models_20210601preview.Sku(name="S0", tier="STANDARD", capacity=instance_count) poller = client.deployments.create_or_update(resource_group, service, name, DEFAULT_DEPLOYMENT_NAME, properties=properties, - sku=models.Sku(name="S0", tier="STANDARD", capacity=instance_count)) + sku=sku) logger.warning("[3/4] Setting default deployment to production") - properties = models.AppResourceProperties( + properties = models_20210601preview.AppResourceProperties( active_deployment_name=DEFAULT_DEPLOYMENT_NAME, public=assign_endpoint) if enable_persistent_storage: - properties.persistent_disk = models.PersistentDisk( + properties.persistent_disk = models_20210601preview.PersistentDisk( size_in_gb=_get_persistent_disk_size(resource.sku.tier), mount_path="/persistent") else: - properties.persistent_disk = models.PersistentDisk( + properties.persistent_disk = models_20210601preview.PersistentDisk( size_in_gb=0, mount_path="/persistent") app_resource.properties = properties @@ -317,15 +325,15 @@ def app_update(cmd, client, resource_group, service, name, resource = client.services.get(resource_group, service) location = resource.location - properties = models_20201101preview.AppResourceProperties(public=assign_endpoint, https_only=https_only, + properties = models_20210601preview.AppResourceProperties(public=assign_endpoint, https_only=https_only, enable_end_to_end_tls=enable_end_to_end_tls) if enable_persistent_storage is True: - properties.persistent_disk = models.PersistentDisk( + properties.persistent_disk = models_20210601preview.PersistentDisk( size_in_gb=_get_persistent_disk_size(resource.sku.tier), mount_path="/persistent") if enable_persistent_storage is False: - properties.persistent_disk = models.PersistentDisk(size_in_gb=0) + properties.persistent_disk = models_20210601preview.PersistentDisk(size_in_gb=0) - app_resource = models_20201101preview.AppResource() + app_resource = models_20210601preview.AppResource() app_resource.properties = properties app_resource.location = location @@ -347,14 +355,14 @@ def app_update(cmd, client, resource_group, service, name, return app_updated logger.warning("[2/2] Updating deployment '{}'".format(deployment)) - deployment_settings = models.DeploymentSettings( - cpu=None, - memory_in_gb=None, + deployment_settings = models_20210601preview.DeploymentSettings( environment_variables=env, jvm_options=jvm_options, net_core_main_entry_path=main_entry, runtime_version=runtime_version,) - properties = models.DeploymentResourceProperties( + deployment_settings.cpu = None + deployment_settings.memory_in_gb = None + properties = models_20210601preview.DeploymentResourceProperties( deployment_settings=deployment_settings) poller = client.deployments.update( resource_group, service, name, deployment, properties) @@ -502,6 +510,8 @@ def app_scale(cmd, client, resource_group, service, name, memory=None, instance_count=None, no_wait=False): + cpu = validate_cpu(cpu) + memory = validate_memory(memory) if deployment is None: deployment = client.apps.get( resource_group, service, name).properties.active_deployment_name @@ -512,12 +522,14 @@ def app_scale(cmd, client, resource_group, service, name, resource = client.services.get(resource_group, service) _validate_instance_count(resource.sku.tier, instance_count) - deployment_settings = models.DeploymentSettings( - cpu=cpu, - memory_in_gb=memory) - properties = models.DeploymentResourceProperties( + resource_requests = models_20210601preview.ResourceRequests(cpu=cpu, memory=memory) + + deployment_settings = models_20210601preview.DeploymentSettings(resource_requests=resource_requests) + deployment_settings.cpu = None + deployment_settings.memory_in_gb = None + properties = models_20210601preview.DeploymentResourceProperties( deployment_settings=deployment_settings) - sku = models.Sku(name="S0", tier="STANDARD", capacity=instance_count) + sku = models_20210601preview.Sku(name="S0", tier="STANDARD", capacity=instance_count) return sdk_no_wait(no_wait, client.deployments.update, resource_group, service, name, deployment, properties=properties, sku=sku) @@ -593,9 +605,9 @@ def app_tail_log(cmd, client, resource_group, service, name, def app_identity_assign(cmd, client, resource_group, service, name, role=None, scope=None): _check_active_deployment_exist(client, resource_group, service, name) - app_resource = models.AppResource() - identity = models.ManagedIdentityProperties(type="systemassigned") - properties = models.AppResourceProperties() + app_resource = models_20210601preview.AppResource() + identity = models_20210601preview.ManagedIdentityProperties(type="systemassigned") + properties = models_20210601preview.AppResourceProperties() resource = client.services.get(resource_group, service) location = resource.location @@ -637,9 +649,9 @@ def app_identity_assign(cmd, client, resource_group, service, name, role=None, s def app_identity_remove(cmd, client, resource_group, service, name): - app_resource = models.AppResource() - identity = models.ManagedIdentityProperties(type="none") - properties = models.AppResourceProperties() + app_resource = models_20210601preview.AppResource() + identity = models_20210601preview.ManagedIdentityProperties(type="none") + properties = models_20210601preview.AppResourceProperties() resource = client.services.get(resource_group, service) location = resource.location @@ -665,13 +677,13 @@ def app_set_deployment(cmd, client, resource_group, service, name, deployment): if deployment not in deployments: raise CLIError("Deployment '" + deployment + "' not found, please use 'az spring-cloud app deployment create' to create the new deployment") - properties = models.AppResourceProperties( + properties = models_20210601preview.AppResourceProperties( active_deployment_name=deployment) resource = client.services.get(resource_group, service) location = resource.location - app_resource = models.AppResource() + app_resource = models_20210601preview.AppResource() app_resource.properties = properties app_resource.location = location @@ -685,12 +697,12 @@ def app_unset_deployment(cmd, client, resource_group, service, name): raise CLIError(NO_PRODUCTION_DEPLOYMENT_SET_ERROR) # It's designed to use empty string for active_deployment_name to unset active deployment - properties = models.AppResourceProperties(active_deployment_name="") + properties = models_20210601preview.AppResourceProperties(active_deployment_name="") resource = client.services.get(resource_group, service) location = resource.location - app_resource = models.AppResource() + app_resource = models_20210601preview.AppResource() app_resource.properties = properties app_resource.location = location @@ -710,6 +722,8 @@ def deployment_create(cmd, client, resource_group, service, app, name, instance_count=None, env=None, no_wait=False): + cpu = validate_cpu(cpu) + memory = validate_memory(memory) logger.warning(LOG_RUNNING_PROMPT) deployments = _get_all_deployments(client, resource_group, service, app) if name in deployments: @@ -728,14 +742,14 @@ def deployment_create(cmd, client, resource_group, service, app, name, active_deployment = client.deployments.get( resource_group, service, app, active_deployment_name) if active_deployment: - cpu = cpu or active_deployment.properties.deployment_settings.cpu - memory = memory or active_deployment.properties.deployment_settings.memory_in_gb + cpu = cpu or active_deployment.properties.deployment_settings.resource_requests.cpu + memory = memory or active_deployment.properties.deployment_settings.resource_requests.memory instance_count = instance_count or active_deployment.sku.capacity jvm_options = jvm_options or active_deployment.properties.deployment_settings.jvm_options env = env or active_deployment.properties.deployment_settings.environment_variables else: - cpu = cpu or 1 - memory = memory or 1 + cpu = cpu or "1" + memory = memory or "1Gi" instance_count = instance_count or 1 file_type, file_path = _get_upload_local_file(runtime_version, artifact_path) @@ -1284,20 +1298,25 @@ def _app_deploy(client, resource_group, service, app, name, version, path, runti raise CLIError( "Failed to get a SAS URL to upload context. Error: {}".format(e.message)) - deployment_settings = models.DeploymentSettings( - cpu=cpu, - memory_in_gb=memory, + resource_requests = None + if cpu is not None or memory is not None: + resource_requests = models_20210601preview.ResourceRequests(cpu=cpu, memory=memory) + + deployment_settings = models_20210601preview.DeploymentSettings( + resource_requests=resource_requests, environment_variables=env, jvm_options=jvm_options, net_core_main_entry_path=main_entry, runtime_version=runtime_version) - sku = models.Sku(name="S0", tier="STANDARD", capacity=instance_count) - user_source_info = models.UserSourceInfo( + deployment_settings.cpu = None + deployment_settings.memory_in_gb = None + sku = models_20210601preview.Sku(name="S0", tier="STANDARD", capacity=instance_count) + user_source_info = models_20210601preview.UserSourceInfo( version=version, relative_path=relative_path, type=file_type, artifact_selector=target_module) - properties = models.DeploymentResourceProperties( + properties = models_20210601preview.DeploymentResourceProperties( deployment_settings=deployment_settings, source=user_source_info) diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_app_platform_management_client.py index 744ebc6929a..d2ce20bbe77 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_app_platform_management_client.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/_app_platform_management_client.py @@ -76,6 +76,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2019-05-01-preview: :mod:`v2019_05_01_preview.models` * 2020-07-01: :mod:`v2020_07_01.models` * 2020-11-01-preview: :mod:`v2020_11_01_preview.models` + * 2021-06-01-preview: :mod:`v2021_06_01_preview.models` """ if api_version == '2019-05-01-preview': from .v2019_05_01_preview import models @@ -86,6 +87,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2020-11-01-preview': from .v2020_11_01_preview import models return models + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview import models + return models raise NotImplementedError("APIVersion {} is not available".format(api_version)) @property @@ -95,6 +99,7 @@ def apps(self): * 2019-05-01-preview: :class:`AppsOperations` * 2020-07-01: :class:`AppsOperations` * 2020-11-01-preview: :class:`AppsOperations` + * 2021-06-01-preview: :class:`AppsOperations` """ api_version = self._get_api_version('apps') if api_version == '2019-05-01-preview': @@ -103,6 +108,8 @@ def apps(self): from .v2020_07_01.operations import AppsOperations as OperationClass elif api_version == '2020-11-01-preview': from .v2020_11_01_preview.operations import AppsOperations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import AppsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -114,6 +121,7 @@ def bindings(self): * 2019-05-01-preview: :class:`BindingsOperations` * 2020-07-01: :class:`BindingsOperations` * 2020-11-01-preview: :class:`BindingsOperations` + * 2021-06-01-preview: :class:`BindingsOperations` """ api_version = self._get_api_version('bindings') if api_version == '2019-05-01-preview': @@ -122,6 +130,8 @@ def bindings(self): from .v2020_07_01.operations import BindingsOperations as OperationClass elif api_version == '2020-11-01-preview': from .v2020_11_01_preview.operations import BindingsOperations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import BindingsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -133,6 +143,7 @@ def certificates(self): * 2019-05-01-preview: :class:`CertificatesOperations` * 2020-07-01: :class:`CertificatesOperations` * 2020-11-01-preview: :class:`CertificatesOperations` + * 2021-06-01-preview: :class:`CertificatesOperations` """ api_version = self._get_api_version('certificates') if api_version == '2019-05-01-preview': @@ -141,6 +152,8 @@ def certificates(self): from .v2020_07_01.operations import CertificatesOperations as OperationClass elif api_version == '2020-11-01-preview': from .v2020_11_01_preview.operations import CertificatesOperations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import CertificatesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -151,12 +164,15 @@ def config_servers(self): * 2020-07-01: :class:`ConfigServersOperations` * 2020-11-01-preview: :class:`ConfigServersOperations` + * 2021-06-01-preview: :class:`ConfigServersOperations` """ api_version = self._get_api_version('config_servers') if api_version == '2020-07-01': from .v2020_07_01.operations import ConfigServersOperations as OperationClass elif api_version == '2020-11-01-preview': from .v2020_11_01_preview.operations import ConfigServersOperations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import ConfigServersOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -168,6 +184,7 @@ def custom_domains(self): * 2019-05-01-preview: :class:`CustomDomainsOperations` * 2020-07-01: :class:`CustomDomainsOperations` * 2020-11-01-preview: :class:`CustomDomainsOperations` + * 2021-06-01-preview: :class:`CustomDomainsOperations` """ api_version = self._get_api_version('custom_domains') if api_version == '2019-05-01-preview': @@ -176,6 +193,8 @@ def custom_domains(self): from .v2020_07_01.operations import CustomDomainsOperations as OperationClass elif api_version == '2020-11-01-preview': from .v2020_11_01_preview.operations import CustomDomainsOperations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import CustomDomainsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -187,6 +206,7 @@ def deployments(self): * 2019-05-01-preview: :class:`DeploymentsOperations` * 2020-07-01: :class:`DeploymentsOperations` * 2020-11-01-preview: :class:`DeploymentsOperations` + * 2021-06-01-preview: :class:`DeploymentsOperations` """ api_version = self._get_api_version('deployments') if api_version == '2019-05-01-preview': @@ -195,6 +215,8 @@ def deployments(self): from .v2020_07_01.operations import DeploymentsOperations as OperationClass elif api_version == '2020-11-01-preview': from .v2020_11_01_preview.operations import DeploymentsOperations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import DeploymentsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -205,12 +227,15 @@ def monitoring_settings(self): * 2020-07-01: :class:`MonitoringSettingsOperations` * 2020-11-01-preview: :class:`MonitoringSettingsOperations` + * 2021-06-01-preview: :class:`MonitoringSettingsOperations` """ api_version = self._get_api_version('monitoring_settings') if api_version == '2020-07-01': from .v2020_07_01.operations import MonitoringSettingsOperations as OperationClass elif api_version == '2020-11-01-preview': from .v2020_11_01_preview.operations import MonitoringSettingsOperations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import MonitoringSettingsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -222,6 +247,7 @@ def operations(self): * 2019-05-01-preview: :class:`Operations` * 2020-07-01: :class:`Operations` * 2020-11-01-preview: :class:`Operations` + * 2021-06-01-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2019-05-01-preview': @@ -230,6 +256,8 @@ def operations(self): from .v2020_07_01.operations import Operations as OperationClass elif api_version == '2020-11-01-preview': from .v2020_11_01_preview.operations import Operations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import Operations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -241,6 +269,7 @@ def runtime_versions(self): * 2019-05-01-preview: :class:`RuntimeVersionsOperations` * 2020-07-01: :class:`RuntimeVersionsOperations` * 2020-11-01-preview: :class:`RuntimeVersionsOperations` + * 2021-06-01-preview: :class:`RuntimeVersionsOperations` """ api_version = self._get_api_version('runtime_versions') if api_version == '2019-05-01-preview': @@ -249,6 +278,8 @@ def runtime_versions(self): from .v2020_07_01.operations import RuntimeVersionsOperations as OperationClass elif api_version == '2020-11-01-preview': from .v2020_11_01_preview.operations import RuntimeVersionsOperations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import RuntimeVersionsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -260,6 +291,7 @@ def services(self): * 2019-05-01-preview: :class:`ServicesOperations` * 2020-07-01: :class:`ServicesOperations` * 2020-11-01-preview: :class:`ServicesOperations` + * 2021-06-01-preview: :class:`ServicesOperations` """ api_version = self._get_api_version('services') if api_version == '2019-05-01-preview': @@ -268,6 +300,8 @@ def services(self): from .v2020_07_01.operations import ServicesOperations as OperationClass elif api_version == '2020-11-01-preview': from .v2020_11_01_preview.operations import ServicesOperations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import ServicesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -291,12 +325,15 @@ def skus(self): * 2020-07-01: :class:`SkusOperations` * 2020-11-01-preview: :class:`SkusOperations` + * 2021-06-01-preview: :class:`SkusOperations` """ api_version = self._get_api_version('skus') if api_version == '2020-07-01': from .v2020_07_01.operations import SkusOperations as OperationClass elif api_version == '2020-11-01-preview': from .v2020_11_01_preview.operations import SkusOperations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import SkusOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/__init__.py index 05307b382a4..e14ef4761e6 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/__init__.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/__init__.py @@ -46,6 +46,7 @@ from ._models_py3 import PersistentDisk from ._models_py3 import ProxyResource from ._models_py3 import RegenerateTestKeyRequestPayload + from ._models_py3 import RequiredTraffic from ._models_py3 import Resource from ._models_py3 import ResourceSku from ._models_py3 import ResourceSkuCapabilities @@ -101,6 +102,7 @@ from ._models import PersistentDisk from ._models import ProxyResource from ._models import RegenerateTestKeyRequestPayload + from ._models import RequiredTraffic from ._models import Resource from ._models import ResourceSku from ._models import ResourceSkuCapabilities @@ -131,6 +133,7 @@ ProvisioningState, ConfigServerState, TraceProxyState, + TrafficDirection, ManagedIdentityType, TestKeyType, AppResourceProvisioningState, @@ -182,6 +185,7 @@ 'PersistentDisk', 'ProxyResource', 'RegenerateTestKeyRequestPayload', + 'RequiredTraffic', 'Resource', 'ResourceSku', 'ResourceSkuCapabilities', @@ -211,6 +215,7 @@ 'ProvisioningState', 'ConfigServerState', 'TraceProxyState', + 'TrafficDirection', 'ManagedIdentityType', 'TestKeyType', 'AppResourceProvisioningState', diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_app_platform_management_client_enums.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_app_platform_management_client_enums.py index bcd6f5bb797..86e2ecb6f68 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_app_platform_management_client_enums.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_app_platform_management_client_enums.py @@ -42,6 +42,12 @@ class TraceProxyState(str, Enum): updating = "Updating" +class TrafficDirection(str, Enum): + + inbound = "Inbound" + outbound = "Outbound" + + class ManagedIdentityType(str, Enum): none = "None" diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models.py index 6db50d93680..1110020745d 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models.py @@ -1238,10 +1238,15 @@ class NetworkProfile(Model): instance. :vartype outbound_ips: ~azure.mgmt.appplatform.v2019_05_01_preview.models.NetworkProfileOutboundIPs + :ivar required_traffics: Required inbound or outbound traffics for Azure + Spring Cloud instance. + :vartype required_traffics: + list[~azure.mgmt.appplatform.v2019_05_01_preview.models.RequiredTraffic] """ _validation = { 'outbound_ips': {'readonly': True}, + 'required_traffics': {'readonly': True}, } _attribute_map = { @@ -1251,6 +1256,7 @@ class NetworkProfile(Model): 'service_runtime_network_resource_group': {'key': 'serviceRuntimeNetworkResourceGroup', 'type': 'str'}, 'app_network_resource_group': {'key': 'appNetworkResourceGroup', 'type': 'str'}, 'outbound_ips': {'key': 'outboundIPs', 'type': 'NetworkProfileOutboundIPs'}, + 'required_traffics': {'key': 'requiredTraffics', 'type': '[RequiredTraffic]'}, } def __init__(self, **kwargs): @@ -1261,6 +1267,7 @@ def __init__(self, **kwargs): self.service_runtime_network_resource_group = kwargs.get('service_runtime_network_resource_group', None) self.app_network_resource_group = kwargs.get('app_network_resource_group', None) self.outbound_ips = None + self.required_traffics = None class NetworkProfileOutboundIPs(Model): @@ -1421,6 +1428,51 @@ def __init__(self, **kwargs): self.key_type = kwargs.get('key_type', None) +class RequiredTraffic(Model): + """Required inbound or outbound traffic for Azure Spring Cloud instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar protocol: The protocol of required traffic + :vartype protocol: str + :ivar port: The port of required traffic + :vartype port: int + :ivar ips: The ip list of required traffic + :vartype ips: list[str] + :ivar fqdns: The FQDN list of required traffic + :vartype fqdns: list[str] + :ivar direction: The direction of required traffic. Possible values + include: 'Inbound', 'Outbound' + :vartype direction: str or + ~azure.mgmt.appplatform.v2019_05_01_preview.models.TrafficDirection + """ + + _validation = { + 'protocol': {'readonly': True}, + 'port': {'readonly': True}, + 'ips': {'readonly': True}, + 'fqdns': {'readonly': True}, + 'direction': {'readonly': True}, + } + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'ips': {'key': 'ips', 'type': '[str]'}, + 'fqdns': {'key': 'fqdns', 'type': '[str]'}, + 'direction': {'key': 'direction', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RequiredTraffic, self).__init__(**kwargs) + self.protocol = None + self.port = None + self.ips = None + self.fqdns = None + self.direction = None + + class ResourceSku(Model): """Describes an available Azure Spring Cloud SKU. @@ -1724,9 +1776,9 @@ def __init__(self, **kwargs): class Sku(Model): """Sku of Azure Spring Cloud. - :param name: Name of the Sku + :param name: Name of the Sku. Default value: "S0" . :type name: str - :param tier: Tier of the Sku + :param tier: Tier of the Sku. Default value: "Standard" . :type tier: str :param capacity: Current capacity of the target resource :type capacity: int @@ -1740,8 +1792,8 @@ class Sku(Model): def __init__(self, **kwargs): super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) + self.name = kwargs.get('name', "S0") + self.tier = kwargs.get('tier', "Standard") self.capacity = kwargs.get('capacity', None) diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models_py3.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models_py3.py index d781484b060..74599f3bd5e 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models_py3.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2019_05_01_preview/models/_models_py3.py @@ -1238,10 +1238,15 @@ class NetworkProfile(Model): instance. :vartype outbound_ips: ~azure.mgmt.appplatform.v2019_05_01_preview.models.NetworkProfileOutboundIPs + :ivar required_traffics: Required inbound or outbound traffics for Azure + Spring Cloud instance. + :vartype required_traffics: + list[~azure.mgmt.appplatform.v2019_05_01_preview.models.RequiredTraffic] """ _validation = { 'outbound_ips': {'readonly': True}, + 'required_traffics': {'readonly': True}, } _attribute_map = { @@ -1251,6 +1256,7 @@ class NetworkProfile(Model): 'service_runtime_network_resource_group': {'key': 'serviceRuntimeNetworkResourceGroup', 'type': 'str'}, 'app_network_resource_group': {'key': 'appNetworkResourceGroup', 'type': 'str'}, 'outbound_ips': {'key': 'outboundIPs', 'type': 'NetworkProfileOutboundIPs'}, + 'required_traffics': {'key': 'requiredTraffics', 'type': '[RequiredTraffic]'}, } def __init__(self, *, service_runtime_subnet_id: str=None, app_subnet_id: str=None, service_cidr: str=None, service_runtime_network_resource_group: str=None, app_network_resource_group: str=None, **kwargs) -> None: @@ -1261,6 +1267,7 @@ def __init__(self, *, service_runtime_subnet_id: str=None, app_subnet_id: str=No self.service_runtime_network_resource_group = service_runtime_network_resource_group self.app_network_resource_group = app_network_resource_group self.outbound_ips = None + self.required_traffics = None class NetworkProfileOutboundIPs(Model): @@ -1421,6 +1428,51 @@ def __init__(self, *, key_type, **kwargs) -> None: self.key_type = key_type +class RequiredTraffic(Model): + """Required inbound or outbound traffic for Azure Spring Cloud instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar protocol: The protocol of required traffic + :vartype protocol: str + :ivar port: The port of required traffic + :vartype port: int + :ivar ips: The ip list of required traffic + :vartype ips: list[str] + :ivar fqdns: The FQDN list of required traffic + :vartype fqdns: list[str] + :ivar direction: The direction of required traffic. Possible values + include: 'Inbound', 'Outbound' + :vartype direction: str or + ~azure.mgmt.appplatform.v2019_05_01_preview.models.TrafficDirection + """ + + _validation = { + 'protocol': {'readonly': True}, + 'port': {'readonly': True}, + 'ips': {'readonly': True}, + 'fqdns': {'readonly': True}, + 'direction': {'readonly': True}, + } + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'ips': {'key': 'ips', 'type': '[str]'}, + 'fqdns': {'key': 'fqdns', 'type': '[str]'}, + 'direction': {'key': 'direction', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(RequiredTraffic, self).__init__(**kwargs) + self.protocol = None + self.port = None + self.ips = None + self.fqdns = None + self.direction = None + + class ResourceSku(Model): """Describes an available Azure Spring Cloud SKU. @@ -1724,9 +1776,9 @@ def __init__(self, *, log_specifications=None, metric_specifications=None, **kwa class Sku(Model): """Sku of Azure Spring Cloud. - :param name: Name of the Sku + :param name: Name of the Sku. Default value: "S0" . :type name: str - :param tier: Tier of the Sku + :param tier: Tier of the Sku. Default value: "Standard" . :type tier: str :param capacity: Current capacity of the target resource :type capacity: int @@ -1738,7 +1790,7 @@ class Sku(Model): 'capacity': {'key': 'capacity', 'type': 'int'}, } - def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: + def __init__(self, *, name: str="S0", tier: str="Standard", capacity: int=None, **kwargs) -> None: super(Sku, self).__init__(**kwargs) self.name = name self.tier = tier diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/__init__.py index 4ce60886aab..938b11a517a 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/__init__.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/__init__.py @@ -51,6 +51,7 @@ from ._models_py3 import PersistentDisk from ._models_py3 import ProxyResource from ._models_py3 import RegenerateTestKeyRequestPayload + from ._models_py3 import RequiredTraffic from ._models_py3 import Resource from ._models_py3 import ResourceSku from ._models_py3 import ResourceSkuCapabilities @@ -110,6 +111,7 @@ from ._models import PersistentDisk from ._models import ProxyResource from ._models import RegenerateTestKeyRequestPayload + from ._models import RequiredTraffic from ._models import Resource from ._models import ResourceSku from ._models import ResourceSkuCapabilities @@ -137,6 +139,7 @@ from ._paged_models import ServiceResourcePaged from ._app_platform_management_client_enums import ( ProvisioningState, + TrafficDirection, ManagedIdentityType, ConfigServerState, MonitoringSettingState, @@ -195,6 +198,7 @@ 'PersistentDisk', 'ProxyResource', 'RegenerateTestKeyRequestPayload', + 'RequiredTraffic', 'Resource', 'ResourceSku', 'ResourceSkuCapabilities', @@ -221,6 +225,7 @@ 'OperationDetailPaged', 'ResourceSkuPaged', 'ProvisioningState', + 'TrafficDirection', 'ManagedIdentityType', 'ConfigServerState', 'MonitoringSettingState', diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_app_platform_management_client_enums.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_app_platform_management_client_enums.py index b24c6101642..5ae8632fbad 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_app_platform_management_client_enums.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_app_platform_management_client_enums.py @@ -25,6 +25,12 @@ class ProvisioningState(str, Enum): move_failed = "MoveFailed" +class TrafficDirection(str, Enum): + + inbound = "Inbound" + outbound = "Outbound" + + class ManagedIdentityType(str, Enum): none = "None" diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models.py index 899625f1fad..38e3860602e 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models.py @@ -1368,10 +1368,15 @@ class NetworkProfile(Model): instance. :vartype outbound_ips: ~azure.mgmt.appplatform.v2020_07_01.models.NetworkProfileOutboundIPs + :ivar required_traffics: Required inbound or outbound traffics for Azure + Spring Cloud instance. + :vartype required_traffics: + list[~azure.mgmt.appplatform.v2020_07_01.models.RequiredTraffic] """ _validation = { 'outbound_ips': {'readonly': True}, + 'required_traffics': {'readonly': True}, } _attribute_map = { @@ -1381,6 +1386,7 @@ class NetworkProfile(Model): 'service_runtime_network_resource_group': {'key': 'serviceRuntimeNetworkResourceGroup', 'type': 'str'}, 'app_network_resource_group': {'key': 'appNetworkResourceGroup', 'type': 'str'}, 'outbound_ips': {'key': 'outboundIPs', 'type': 'NetworkProfileOutboundIPs'}, + 'required_traffics': {'key': 'requiredTraffics', 'type': '[RequiredTraffic]'}, } def __init__(self, **kwargs): @@ -1391,6 +1397,7 @@ def __init__(self, **kwargs): self.service_runtime_network_resource_group = kwargs.get('service_runtime_network_resource_group', None) self.app_network_resource_group = kwargs.get('app_network_resource_group', None) self.outbound_ips = None + self.required_traffics = None class NetworkProfileOutboundIPs(Model): @@ -1550,6 +1557,51 @@ def __init__(self, **kwargs): self.key_type = kwargs.get('key_type', None) +class RequiredTraffic(Model): + """Required inbound or outbound traffic for Azure Spring Cloud instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar protocol: The protocol of required traffic + :vartype protocol: str + :ivar port: The port of required traffic + :vartype port: int + :ivar ips: The ip list of required traffic + :vartype ips: list[str] + :ivar fqdns: The FQDN list of required traffic + :vartype fqdns: list[str] + :ivar direction: The direction of required traffic. Possible values + include: 'Inbound', 'Outbound' + :vartype direction: str or + ~azure.mgmt.appplatform.v2020_07_01.models.TrafficDirection + """ + + _validation = { + 'protocol': {'readonly': True}, + 'port': {'readonly': True}, + 'ips': {'readonly': True}, + 'fqdns': {'readonly': True}, + 'direction': {'readonly': True}, + } + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'ips': {'key': 'ips', 'type': '[str]'}, + 'fqdns': {'key': 'fqdns', 'type': '[str]'}, + 'direction': {'key': 'direction', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RequiredTraffic, self).__init__(**kwargs) + self.protocol = None + self.port = None + self.ips = None + self.fqdns = None + self.direction = None + + class ResourceSku(Model): """Describes an available Azure Spring Cloud SKU. diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models_py3.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models_py3.py index 261e7655946..a57125e51df 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models_py3.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_07_01/models/_models_py3.py @@ -1368,10 +1368,15 @@ class NetworkProfile(Model): instance. :vartype outbound_ips: ~azure.mgmt.appplatform.v2020_07_01.models.NetworkProfileOutboundIPs + :ivar required_traffics: Required inbound or outbound traffics for Azure + Spring Cloud instance. + :vartype required_traffics: + list[~azure.mgmt.appplatform.v2020_07_01.models.RequiredTraffic] """ _validation = { 'outbound_ips': {'readonly': True}, + 'required_traffics': {'readonly': True}, } _attribute_map = { @@ -1381,6 +1386,7 @@ class NetworkProfile(Model): 'service_runtime_network_resource_group': {'key': 'serviceRuntimeNetworkResourceGroup', 'type': 'str'}, 'app_network_resource_group': {'key': 'appNetworkResourceGroup', 'type': 'str'}, 'outbound_ips': {'key': 'outboundIPs', 'type': 'NetworkProfileOutboundIPs'}, + 'required_traffics': {'key': 'requiredTraffics', 'type': '[RequiredTraffic]'}, } def __init__(self, *, service_runtime_subnet_id: str=None, app_subnet_id: str=None, service_cidr: str=None, service_runtime_network_resource_group: str=None, app_network_resource_group: str=None, **kwargs) -> None: @@ -1391,6 +1397,7 @@ def __init__(self, *, service_runtime_subnet_id: str=None, app_subnet_id: str=No self.service_runtime_network_resource_group = service_runtime_network_resource_group self.app_network_resource_group = app_network_resource_group self.outbound_ips = None + self.required_traffics = None class NetworkProfileOutboundIPs(Model): @@ -1550,6 +1557,51 @@ def __init__(self, *, key_type, **kwargs) -> None: self.key_type = key_type +class RequiredTraffic(Model): + """Required inbound or outbound traffic for Azure Spring Cloud instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar protocol: The protocol of required traffic + :vartype protocol: str + :ivar port: The port of required traffic + :vartype port: int + :ivar ips: The ip list of required traffic + :vartype ips: list[str] + :ivar fqdns: The FQDN list of required traffic + :vartype fqdns: list[str] + :ivar direction: The direction of required traffic. Possible values + include: 'Inbound', 'Outbound' + :vartype direction: str or + ~azure.mgmt.appplatform.v2020_07_01.models.TrafficDirection + """ + + _validation = { + 'protocol': {'readonly': True}, + 'port': {'readonly': True}, + 'ips': {'readonly': True}, + 'fqdns': {'readonly': True}, + 'direction': {'readonly': True}, + } + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'ips': {'key': 'ips', 'type': '[str]'}, + 'fqdns': {'key': 'fqdns', 'type': '[str]'}, + 'direction': {'key': 'direction', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(RequiredTraffic, self).__init__(**kwargs) + self.protocol = None + self.port = None + self.ips = None + self.fqdns = None + self.direction = None + + class ResourceSku(Model): """Describes an available Azure Spring Cloud SKU. diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models.py index 5e4cb8128dc..f8f5be052bd 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models.py @@ -165,8 +165,6 @@ class AppResourceProperties(Model): :type fqdn: str :param https_only: Indicate if only https is allowed. :type https_only: bool - :param enable_end_to_end_tls: Indicate if end to end TLS is enabled. - :type enable_end_to_end_tls: bool :ivar created_time: Date time when the resource is created :vartype created_time: datetime :param temporary_disk: Temporary disk settings @@ -175,6 +173,8 @@ class AppResourceProperties(Model): :param persistent_disk: Persistent disk settings :type persistent_disk: ~azure.mgmt.appplatform.v2020_11_01_preview.models.PersistentDisk + :param enable_end_to_end_tls: Indicate if end to end TLS is enabled. + :type enable_end_to_end_tls: bool """ _validation = { @@ -190,10 +190,10 @@ class AppResourceProperties(Model): 'active_deployment_name': {'key': 'activeDeploymentName', 'type': 'str'}, 'fqdn': {'key': 'fqdn', 'type': 'str'}, 'https_only': {'key': 'httpsOnly', 'type': 'bool'}, - 'enable_end_to_end_tls': {'key': 'enableEndToEndTLS', 'type': 'bool'}, 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, 'temporary_disk': {'key': 'temporaryDisk', 'type': 'TemporaryDisk'}, 'persistent_disk': {'key': 'persistentDisk', 'type': 'PersistentDisk'}, + 'enable_end_to_end_tls': {'key': 'enableEndToEndTLS', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -204,10 +204,10 @@ def __init__(self, **kwargs): self.active_deployment_name = kwargs.get('active_deployment_name', None) self.fqdn = kwargs.get('fqdn', None) self.https_only = kwargs.get('https_only', None) - self.enable_end_to_end_tls = kwargs.get('enable_end_to_end_tls', None) self.created_time = None self.temporary_disk = kwargs.get('temporary_disk', None) self.persistent_disk = kwargs.get('persistent_disk', None) + self.enable_end_to_end_tls = kwargs.get('enable_end_to_end_tls', None) class AvailableRuntimeVersions(Model): @@ -1951,9 +1951,9 @@ def __init__(self, **kwargs): class Sku(Model): """Sku of Azure Spring Cloud. - :param name: Name of the Sku + :param name: Name of the Sku. Default value: "S0" . :type name: str - :param tier: Tier of the Sku + :param tier: Tier of the Sku. Default value: "Standard" . :type tier: str :param capacity: Current capacity of the target resource :type capacity: int @@ -1967,8 +1967,8 @@ class Sku(Model): def __init__(self, **kwargs): super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) + self.name = kwargs.get('name', "S0") + self.tier = kwargs.get('tier', "Standard") self.capacity = kwargs.get('capacity', None) diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models_py3.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models_py3.py index 7cd772766b3..aff0c5844b1 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models_py3.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2020_11_01_preview/models/_models_py3.py @@ -165,8 +165,6 @@ class AppResourceProperties(Model): :type fqdn: str :param https_only: Indicate if only https is allowed. :type https_only: bool - :param enable_end_to_end_tls: Indicate if end to end TLS is enabled. - :type enable_end_to_end_tls: bool :ivar created_time: Date time when the resource is created :vartype created_time: datetime :param temporary_disk: Temporary disk settings @@ -175,6 +173,8 @@ class AppResourceProperties(Model): :param persistent_disk: Persistent disk settings :type persistent_disk: ~azure.mgmt.appplatform.v2020_11_01_preview.models.PersistentDisk + :param enable_end_to_end_tls: Indicate if end to end TLS is enabled. + :type enable_end_to_end_tls: bool """ _validation = { @@ -190,13 +190,13 @@ class AppResourceProperties(Model): 'active_deployment_name': {'key': 'activeDeploymentName', 'type': 'str'}, 'fqdn': {'key': 'fqdn', 'type': 'str'}, 'https_only': {'key': 'httpsOnly', 'type': 'bool'}, - 'enable_end_to_end_tls': {'key': 'enableEndToEndTLS', 'type': 'bool'}, 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, 'temporary_disk': {'key': 'temporaryDisk', 'type': 'TemporaryDisk'}, 'persistent_disk': {'key': 'persistentDisk', 'type': 'PersistentDisk'}, + 'enable_end_to_end_tls': {'key': 'enableEndToEndTLS', 'type': 'bool'}, } - def __init__(self, *, public: bool=None, active_deployment_name: str=None, fqdn: str=None, https_only: bool=None, enable_end_to_end_tls: bool=None, temporary_disk=None, persistent_disk=None, **kwargs) -> None: + def __init__(self, *, public: bool=None, active_deployment_name: str=None, fqdn: str=None, https_only: bool=None, temporary_disk=None, persistent_disk=None, enable_end_to_end_tls: bool=None, **kwargs) -> None: super(AppResourceProperties, self).__init__(**kwargs) self.public = public self.url = None @@ -204,10 +204,10 @@ def __init__(self, *, public: bool=None, active_deployment_name: str=None, fqdn: self.active_deployment_name = active_deployment_name self.fqdn = fqdn self.https_only = https_only - self.enable_end_to_end_tls = enable_end_to_end_tls self.created_time = None self.temporary_disk = temporary_disk self.persistent_disk = persistent_disk + self.enable_end_to_end_tls = enable_end_to_end_tls class AvailableRuntimeVersions(Model): @@ -1951,9 +1951,9 @@ def __init__(self, *, log_specifications=None, metric_specifications=None, **kwa class Sku(Model): """Sku of Azure Spring Cloud. - :param name: Name of the Sku + :param name: Name of the Sku. Default value: "S0" . :type name: str - :param tier: Tier of the Sku + :param tier: Tier of the Sku. Default value: "Standard" . :type tier: str :param capacity: Current capacity of the target resource :type capacity: int @@ -1965,7 +1965,7 @@ class Sku(Model): 'capacity': {'key': 'capacity', 'type': 'int'}, } - def __init__(self, *, name: str=None, tier: str=None, capacity: int=None, **kwargs) -> None: + def __init__(self, *, name: str="S0", tier: str="Standard", capacity: int=None, **kwargs) -> None: super(Sku, self).__init__(**kwargs) self.name = name self.tier = tier diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/__init__.py similarity index 69% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/__init__.py rename to src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/__init__.py index 9854e4f7645..ee44eafce0f 100644 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/__init__.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .container_service_client import ContainerServiceClient -from .version import VERSION +from ._configuration import AppPlatformManagementClientConfiguration +from ._app_platform_management_client import AppPlatformManagementClient +__all__ = ['AppPlatformManagementClient', 'AppPlatformManagementClientConfiguration'] -__all__ = ['ContainerServiceClient'] +from .version import VERSION __version__ = VERSION diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_app_platform_management_client.py new file mode 100644 index 00000000000..a057464c518 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_app_platform_management_client.py @@ -0,0 +1,101 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import AppPlatformManagementClientConfiguration +from .operations import ServicesOperations +from .operations import ConfigServersOperations +from .operations import MonitoringSettingsOperations +from .operations import AppsOperations +from .operations import BindingsOperations +from .operations import CertificatesOperations +from .operations import CustomDomainsOperations +from .operations import DeploymentsOperations +from .operations import Operations +from .operations import RuntimeVersionsOperations +from .operations import SkusOperations +from . import models + + +class AppPlatformManagementClient(SDKClient): + """REST API for Azure Spring Cloud + + :ivar config: Configuration for client. + :vartype config: AppPlatformManagementClientConfiguration + + :ivar services: Services operations + :vartype services: azure.mgmt.appplatform.v2021_06_01_preview.operations.ServicesOperations + :ivar config_servers: ConfigServers operations + :vartype config_servers: azure.mgmt.appplatform.v2021_06_01_preview.operations.ConfigServersOperations + :ivar monitoring_settings: MonitoringSettings operations + :vartype monitoring_settings: azure.mgmt.appplatform.v2021_06_01_preview.operations.MonitoringSettingsOperations + :ivar apps: Apps operations + :vartype apps: azure.mgmt.appplatform.v2021_06_01_preview.operations.AppsOperations + :ivar bindings: Bindings operations + :vartype bindings: azure.mgmt.appplatform.v2021_06_01_preview.operations.BindingsOperations + :ivar certificates: Certificates operations + :vartype certificates: azure.mgmt.appplatform.v2021_06_01_preview.operations.CertificatesOperations + :ivar custom_domains: CustomDomains operations + :vartype custom_domains: azure.mgmt.appplatform.v2021_06_01_preview.operations.CustomDomainsOperations + :ivar deployments: Deployments operations + :vartype deployments: azure.mgmt.appplatform.v2021_06_01_preview.operations.DeploymentsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.appplatform.v2021_06_01_preview.operations.Operations + :ivar runtime_versions: RuntimeVersions operations + :vartype runtime_versions: azure.mgmt.appplatform.v2021_06_01_preview.operations.RuntimeVersionsOperations + :ivar skus: Skus operations + :vartype skus: azure.mgmt.appplatform.v2021_06_01_preview.operations.SkusOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Gets subscription ID which uniquely identify the + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = AppPlatformManagementClientConfiguration(credentials, subscription_id, base_url) + super(AppPlatformManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2021-06-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.services = ServicesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.config_servers = ConfigServersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.monitoring_settings = MonitoringSettingsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.apps = AppsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.bindings = BindingsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.certificates = CertificatesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.custom_domains = CustomDomainsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.deployments = DeploymentsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.runtime_versions = RuntimeVersionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.skus = SkusOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/_configuration.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_configuration.py similarity index 82% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/_configuration.py rename to src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_configuration.py index e94fbc7005d..5a7f3752f05 100644 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/_configuration.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/_configuration.py @@ -13,15 +13,15 @@ from .version import VERSION -class ContainerServiceClientConfiguration(AzureConfiguration): - """Configuration for ContainerServiceClient +class AppPlatformManagementClientConfiguration(AzureConfiguration): + """Configuration for AppPlatformManagementClient Note that all parameters used to create this instance are saved as instance attributes. :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param subscription_id: Subscription credentials which uniquely identify + :param subscription_id: Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str @@ -38,12 +38,12 @@ def __init__( if not base_url: base_url = 'https://management.azure.com' - super(ContainerServiceClientConfiguration, self).__init__(base_url) + super(AppPlatformManagementClientConfiguration, self).__init__(base_url) # Starting Autorest.Python 4.0.64, make connection pool activated by default self.keep_alive = True - self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-appplatform/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/__init__.py new file mode 100644 index 00000000000..e2b1091ec8a --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/__init__.py @@ -0,0 +1,249 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import ApplicationInsightsAgentVersions + from ._models_py3 import AppResource + from ._models_py3 import AppResourceProperties + from ._models_py3 import AvailableRuntimeVersions + from ._models_py3 import BindingResource + from ._models_py3 import BindingResourceProperties + from ._models_py3 import CertificateProperties + from ._models_py3 import CertificateResource + from ._models_py3 import ClusterResourceProperties + from ._models_py3 import ConfigServerGitProperty + from ._models_py3 import ConfigServerProperties + from ._models_py3 import ConfigServerResource + from ._models_py3 import ConfigServerSettings + from ._models_py3 import ConfigServerSettingsErrorRecord + from ._models_py3 import ConfigServerSettingsValidateResult + from ._models_py3 import CustomDomainProperties + from ._models_py3 import CustomDomainResource + from ._models_py3 import CustomDomainValidatePayload + from ._models_py3 import CustomDomainValidateResult + from ._models_py3 import DeploymentInstance + from ._models_py3 import DeploymentResource + from ._models_py3 import DeploymentResourceProperties + from ._models_py3 import DeploymentSettings + from ._models_py3 import Error + from ._models_py3 import GitPatternRepository + from ._models_py3 import LogFileUrlResponse + from ._models_py3 import LogSpecification + from ._models_py3 import ManagedIdentityProperties + from ._models_py3 import MetricDimension + from ._models_py3 import MetricSpecification + from ._models_py3 import MonitoringSettingProperties + from ._models_py3 import MonitoringSettingResource + from ._models_py3 import NameAvailability + from ._models_py3 import NameAvailabilityParameters + from ._models_py3 import NetworkProfile + from ._models_py3 import NetworkProfileOutboundIPs + from ._models_py3 import OperationDetail + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationProperties + from ._models_py3 import PersistentDisk + from ._models_py3 import ProxyResource + from ._models_py3 import RegenerateTestKeyRequestPayload + from ._models_py3 import RequiredTraffic + from ._models_py3 import Resource + from ._models_py3 import ResourceRequests + from ._models_py3 import ResourceSku + from ._models_py3 import ResourceSkuCapabilities + from ._models_py3 import ResourceSkuLocationInfo + from ._models_py3 import ResourceSkuRestrictionInfo + from ._models_py3 import ResourceSkuRestrictions + from ._models_py3 import ResourceSkuZoneDetails + from ._models_py3 import ResourceUploadDefinition + from ._models_py3 import ServiceResource + from ._models_py3 import ServiceSpecification + from ._models_py3 import Sku + from ._models_py3 import SkuCapacity + from ._models_py3 import SupportedRuntimeVersion + from ._models_py3 import TemporaryDisk + from ._models_py3 import TestKeys + from ._models_py3 import TrackedResource + from ._models_py3 import UserSourceInfo +except (SyntaxError, ImportError): + from ._models import ApplicationInsightsAgentVersions + from ._models import AppResource + from ._models import AppResourceProperties + from ._models import AvailableRuntimeVersions + from ._models import BindingResource + from ._models import BindingResourceProperties + from ._models import CertificateProperties + from ._models import CertificateResource + from ._models import ClusterResourceProperties + from ._models import ConfigServerGitProperty + from ._models import ConfigServerProperties + from ._models import ConfigServerResource + from ._models import ConfigServerSettings + from ._models import ConfigServerSettingsErrorRecord + from ._models import ConfigServerSettingsValidateResult + from ._models import CustomDomainProperties + from ._models import CustomDomainResource + from ._models import CustomDomainValidatePayload + from ._models import CustomDomainValidateResult + from ._models import DeploymentInstance + from ._models import DeploymentResource + from ._models import DeploymentResourceProperties + from ._models import DeploymentSettings + from ._models import Error + from ._models import GitPatternRepository + from ._models import LogFileUrlResponse + from ._models import LogSpecification + from ._models import ManagedIdentityProperties + from ._models import MetricDimension + from ._models import MetricSpecification + from ._models import MonitoringSettingProperties + from ._models import MonitoringSettingResource + from ._models import NameAvailability + from ._models import NameAvailabilityParameters + from ._models import NetworkProfile + from ._models import NetworkProfileOutboundIPs + from ._models import OperationDetail + from ._models import OperationDisplay + from ._models import OperationProperties + from ._models import PersistentDisk + from ._models import ProxyResource + from ._models import RegenerateTestKeyRequestPayload + from ._models import RequiredTraffic + from ._models import Resource + from ._models import ResourceRequests + from ._models import ResourceSku + from ._models import ResourceSkuCapabilities + from ._models import ResourceSkuLocationInfo + from ._models import ResourceSkuRestrictionInfo + from ._models import ResourceSkuRestrictions + from ._models import ResourceSkuZoneDetails + from ._models import ResourceUploadDefinition + from ._models import ServiceResource + from ._models import ServiceSpecification + from ._models import Sku + from ._models import SkuCapacity + from ._models import SupportedRuntimeVersion + from ._models import TemporaryDisk + from ._models import TestKeys + from ._models import TrackedResource + from ._models import UserSourceInfo +from ._paged_models import AppResourcePaged +from ._paged_models import BindingResourcePaged +from ._paged_models import CertificateResourcePaged +from ._paged_models import CustomDomainResourcePaged +from ._paged_models import DeploymentResourcePaged +from ._paged_models import OperationDetailPaged +from ._paged_models import ResourceSkuPaged +from ._paged_models import ServiceResourcePaged +from ._app_platform_management_client_enums import ( + ProvisioningState, + TrafficDirection, + ManagedIdentityType, + ConfigServerState, + MonitoringSettingState, + TestKeyType, + AppResourceProvisioningState, + UserSourceType, + RuntimeVersion, + DeploymentResourceProvisioningState, + DeploymentResourceStatus, + SkuScaleType, + ResourceSkuRestrictionsType, + ResourceSkuRestrictionsReasonCode, + SupportedRuntimeValue, + SupportedRuntimePlatform, +) + +__all__ = [ + 'ApplicationInsightsAgentVersions', + 'AppResource', + 'AppResourceProperties', + 'AvailableRuntimeVersions', + 'BindingResource', + 'BindingResourceProperties', + 'CertificateProperties', + 'CertificateResource', + 'ClusterResourceProperties', + 'ConfigServerGitProperty', + 'ConfigServerProperties', + 'ConfigServerResource', + 'ConfigServerSettings', + 'ConfigServerSettingsErrorRecord', + 'ConfigServerSettingsValidateResult', + 'CustomDomainProperties', + 'CustomDomainResource', + 'CustomDomainValidatePayload', + 'CustomDomainValidateResult', + 'DeploymentInstance', + 'DeploymentResource', + 'DeploymentResourceProperties', + 'DeploymentSettings', + 'Error', + 'GitPatternRepository', + 'LogFileUrlResponse', + 'LogSpecification', + 'ManagedIdentityProperties', + 'MetricDimension', + 'MetricSpecification', + 'MonitoringSettingProperties', + 'MonitoringSettingResource', + 'NameAvailability', + 'NameAvailabilityParameters', + 'NetworkProfile', + 'NetworkProfileOutboundIPs', + 'OperationDetail', + 'OperationDisplay', + 'OperationProperties', + 'PersistentDisk', + 'ProxyResource', + 'RegenerateTestKeyRequestPayload', + 'RequiredTraffic', + 'Resource', + 'ResourceRequests', + 'ResourceSku', + 'ResourceSkuCapabilities', + 'ResourceSkuLocationInfo', + 'ResourceSkuRestrictionInfo', + 'ResourceSkuRestrictions', + 'ResourceSkuZoneDetails', + 'ResourceUploadDefinition', + 'ServiceResource', + 'ServiceSpecification', + 'Sku', + 'SkuCapacity', + 'SupportedRuntimeVersion', + 'TemporaryDisk', + 'TestKeys', + 'TrackedResource', + 'UserSourceInfo', + 'ServiceResourcePaged', + 'AppResourcePaged', + 'BindingResourcePaged', + 'CertificateResourcePaged', + 'CustomDomainResourcePaged', + 'DeploymentResourcePaged', + 'OperationDetailPaged', + 'ResourceSkuPaged', + 'ProvisioningState', + 'TrafficDirection', + 'ManagedIdentityType', + 'ConfigServerState', + 'MonitoringSettingState', + 'TestKeyType', + 'AppResourceProvisioningState', + 'UserSourceType', + 'RuntimeVersion', + 'DeploymentResourceProvisioningState', + 'DeploymentResourceStatus', + 'SkuScaleType', + 'ResourceSkuRestrictionsType', + 'ResourceSkuRestrictionsReasonCode', + 'SupportedRuntimeValue', + 'SupportedRuntimePlatform', +] diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_app_platform_management_client_enums.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_app_platform_management_client_enums.py new file mode 100644 index 00000000000..5ae8632fbad --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_app_platform_management_client_enums.py @@ -0,0 +1,135 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class ProvisioningState(str, Enum): + + creating = "Creating" + updating = "Updating" + deleting = "Deleting" + deleted = "Deleted" + succeeded = "Succeeded" + failed = "Failed" + moving = "Moving" + moved = "Moved" + move_failed = "MoveFailed" + + +class TrafficDirection(str, Enum): + + inbound = "Inbound" + outbound = "Outbound" + + +class ManagedIdentityType(str, Enum): + + none = "None" + system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + system_assigned_user_assigned = "SystemAssigned,UserAssigned" + + +class ConfigServerState(str, Enum): + + not_available = "NotAvailable" + deleted = "Deleted" + failed = "Failed" + succeeded = "Succeeded" + updating = "Updating" + + +class MonitoringSettingState(str, Enum): + + not_available = "NotAvailable" + failed = "Failed" + succeeded = "Succeeded" + updating = "Updating" + + +class TestKeyType(str, Enum): + + primary = "Primary" + secondary = "Secondary" + + +class AppResourceProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + creating = "Creating" + updating = "Updating" + + +class UserSourceType(str, Enum): + + jar = "Jar" + net_core_zip = "NetCoreZip" + source = "Source" + + +class RuntimeVersion(str, Enum): + + java_8 = "Java_8" + java_11 = "Java_11" + net_core_31 = "NetCore_31" + + +class DeploymentResourceProvisioningState(str, Enum): + + creating = "Creating" + updating = "Updating" + succeeded = "Succeeded" + failed = "Failed" + + +class DeploymentResourceStatus(str, Enum): + + unknown = "Unknown" + stopped = "Stopped" + running = "Running" + failed = "Failed" + allocating = "Allocating" + upgrading = "Upgrading" + compiling = "Compiling" + + +class SkuScaleType(str, Enum): + + none = "None" + manual = "Manual" + automatic = "Automatic" + + +class ResourceSkuRestrictionsType(str, Enum): + + location = "Location" + zone = "Zone" + + +class ResourceSkuRestrictionsReasonCode(str, Enum): + + quota_id = "QuotaId" + not_available_for_subscription = "NotAvailableForSubscription" + + +class SupportedRuntimeValue(str, Enum): + + java_8 = "Java_8" + java_11 = "Java_11" + net_core_31 = "NetCore_31" + + +class SupportedRuntimePlatform(str, Enum): + + java = "Java" + net_core = ".NET Core" diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models.py new file mode 100644 index 00000000000..e7be2477a24 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models.py @@ -0,0 +1,2160 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ApplicationInsightsAgentVersions(Model): + """Application Insights agent versions properties payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar java: Indicates the version of application insight java agent + :vartype java: str + """ + + _validation = { + 'java': {'readonly': True}, + } + + _attribute_map = { + 'java': {'key': 'java', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationInsightsAgentVersions, self).__init__(**kwargs) + self.java = None + + +class Resource(Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + + +class AppResource(ProxyResource): + """App resource payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the App resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.AppResourceProperties + :param identity: The Managed Identity type of the app resource + :type identity: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ManagedIdentityProperties + :param location: The GEO location of the application, always the same with + its parent resource + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AppResourceProperties'}, + 'identity': {'key': 'identity', 'type': 'ManagedIdentityProperties'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AppResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.identity = kwargs.get('identity', None) + self.location = kwargs.get('location', None) + + +class AppResourceProperties(Model): + """App resource properties payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param public: Indicates whether the App exposes public endpoint + :type public: bool + :ivar url: URL of the App + :vartype url: str + :ivar provisioning_state: Provisioning state of the App. Possible values + include: 'Succeeded', 'Failed', 'Creating', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.AppResourceProvisioningState + :param active_deployment_name: Name of the active deployment of the App + :type active_deployment_name: str + :param fqdn: Fully qualified dns Name. + :type fqdn: str + :param https_only: Indicate if only https is allowed. + :type https_only: bool + :ivar created_time: Date time when the resource is created + :vartype created_time: datetime + :param temporary_disk: Temporary disk settings + :type temporary_disk: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.TemporaryDisk + :param persistent_disk: Persistent disk settings + :type persistent_disk: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.PersistentDisk + :param enable_end_to_end_tls: Indicate if end to end TLS is enabled. + :type enable_end_to_end_tls: bool + """ + + _validation = { + 'url': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_time': {'readonly': True}, + } + + _attribute_map = { + 'public': {'key': 'public', 'type': 'bool'}, + 'url': {'key': 'url', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'active_deployment_name': {'key': 'activeDeploymentName', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'https_only': {'key': 'httpsOnly', 'type': 'bool'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'temporary_disk': {'key': 'temporaryDisk', 'type': 'TemporaryDisk'}, + 'persistent_disk': {'key': 'persistentDisk', 'type': 'PersistentDisk'}, + 'enable_end_to_end_tls': {'key': 'enableEndToEndTLS', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AppResourceProperties, self).__init__(**kwargs) + self.public = kwargs.get('public', None) + self.url = None + self.provisioning_state = None + self.active_deployment_name = kwargs.get('active_deployment_name', None) + self.fqdn = kwargs.get('fqdn', None) + self.https_only = kwargs.get('https_only', None) + self.created_time = None + self.temporary_disk = kwargs.get('temporary_disk', None) + self.persistent_disk = kwargs.get('persistent_disk', None) + self.enable_end_to_end_tls = kwargs.get('enable_end_to_end_tls', None) + + +class AvailableRuntimeVersions(Model): + """AvailableRuntimeVersions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A list of all supported runtime versions. + :vartype value: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.SupportedRuntimeVersion] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SupportedRuntimeVersion]'}, + } + + def __init__(self, **kwargs): + super(AvailableRuntimeVersions, self).__init__(**kwargs) + self.value = None + + +class BindingResource(ProxyResource): + """Binding resource payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the Binding resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.BindingResourceProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BindingResourceProperties'}, + } + + def __init__(self, **kwargs): + super(BindingResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class BindingResourceProperties(Model): + """Binding resource properties payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_name: The name of the bound resource + :vartype resource_name: str + :ivar resource_type: The standard Azure resource type of the bound + resource + :vartype resource_type: str + :param resource_id: The Azure resource id of the bound resource + :type resource_id: str + :param key: The key of the bound resource + :type key: str + :param binding_parameters: Binding parameters of the Binding resource + :type binding_parameters: dict[str, object] + :ivar generated_properties: The generated Spring Boot property file for + this binding. The secret will be deducted. + :vartype generated_properties: str + :ivar created_at: Creation time of the Binding resource + :vartype created_at: str + :ivar updated_at: Update time of the Binding resource + :vartype updated_at: str + """ + + _validation = { + 'resource_name': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'generated_properties': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + } + + _attribute_map = { + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + 'binding_parameters': {'key': 'bindingParameters', 'type': '{object}'}, + 'generated_properties': {'key': 'generatedProperties', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'str'}, + 'updated_at': {'key': 'updatedAt', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BindingResourceProperties, self).__init__(**kwargs) + self.resource_name = None + self.resource_type = None + self.resource_id = kwargs.get('resource_id', None) + self.key = kwargs.get('key', None) + self.binding_parameters = kwargs.get('binding_parameters', None) + self.generated_properties = None + self.created_at = None + self.updated_at = None + + +class CertificateProperties(Model): + """Certificate resource payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar thumbprint: The thumbprint of certificate. + :vartype thumbprint: str + :param vault_uri: Required. The vault uri of user key vault. + :type vault_uri: str + :param key_vault_cert_name: Required. The certificate name of key vault. + :type key_vault_cert_name: str + :param cert_version: The certificate version of key vault. + :type cert_version: str + :ivar issuer: The issuer of certificate. + :vartype issuer: str + :ivar issued_date: The issue date of certificate. + :vartype issued_date: str + :ivar expiration_date: The expiration date of certificate. + :vartype expiration_date: str + :ivar activate_date: The activate date of certificate. + :vartype activate_date: str + :ivar subject_name: The subject name of certificate. + :vartype subject_name: str + :ivar dns_names: The domain list of certificate. + :vartype dns_names: list[str] + """ + + _validation = { + 'thumbprint': {'readonly': True}, + 'vault_uri': {'required': True}, + 'key_vault_cert_name': {'required': True}, + 'issuer': {'readonly': True}, + 'issued_date': {'readonly': True}, + 'expiration_date': {'readonly': True}, + 'activate_date': {'readonly': True}, + 'subject_name': {'readonly': True}, + 'dns_names': {'readonly': True}, + } + + _attribute_map = { + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'vault_uri': {'key': 'vaultUri', 'type': 'str'}, + 'key_vault_cert_name': {'key': 'keyVaultCertName', 'type': 'str'}, + 'cert_version': {'key': 'certVersion', 'type': 'str'}, + 'issuer': {'key': 'issuer', 'type': 'str'}, + 'issued_date': {'key': 'issuedDate', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'str'}, + 'activate_date': {'key': 'activateDate', 'type': 'str'}, + 'subject_name': {'key': 'subjectName', 'type': 'str'}, + 'dns_names': {'key': 'dnsNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(CertificateProperties, self).__init__(**kwargs) + self.thumbprint = None + self.vault_uri = kwargs.get('vault_uri', None) + self.key_vault_cert_name = kwargs.get('key_vault_cert_name', None) + self.cert_version = kwargs.get('cert_version', None) + self.issuer = None + self.issued_date = None + self.expiration_date = None + self.activate_date = None + self.subject_name = None + self.dns_names = None + + +class CertificateResource(ProxyResource): + """Certificate resource payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the certificate resource payload. + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.CertificateProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CertificateProperties'}, + } + + def __init__(self, **kwargs): + super(CertificateResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class CloudError(Model): + """An error response from the service. + + :param error: An error response from the service. + :type error: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class ClusterResourceProperties(Model): + """Service properties payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provisioning_state: Provisioning state of the Service. Possible + values include: 'Creating', 'Updating', 'Deleting', 'Deleted', + 'Succeeded', 'Failed', 'Moving', 'Moved', 'MoveFailed' + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ProvisioningState + :param network_profile: Network profile of the Service + :type network_profile: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.NetworkProfile + :ivar version: Version of the Service + :vartype version: int + :ivar service_id: ServiceInstanceEntity GUID which uniquely identifies a + created resource + :vartype service_id: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'version': {'readonly': True}, + 'service_id': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'network_profile': {'key': 'networkProfile', 'type': 'NetworkProfile'}, + 'version': {'key': 'version', 'type': 'int'}, + 'service_id': {'key': 'serviceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterResourceProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.network_profile = kwargs.get('network_profile', None) + self.version = None + self.service_id = None + + +class ConfigServerGitProperty(Model): + """Property of git. + + All required parameters must be populated in order to send to Azure. + + :param repositories: Repositories of git. + :type repositories: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.GitPatternRepository] + :param uri: Required. URI of the repository + :type uri: str + :param label: Label of the repository + :type label: str + :param search_paths: Searching path of the repository + :type search_paths: list[str] + :param username: Username of git repository basic auth. + :type username: str + :param password: Password of git repository basic auth. + :type password: str + :param host_key: Public sshKey of git repository. + :type host_key: str + :param host_key_algorithm: SshKey algorithm of git repository. + :type host_key_algorithm: str + :param private_key: Private sshKey algorithm of git repository. + :type private_key: str + :param strict_host_key_checking: Strict host key checking or not. + :type strict_host_key_checking: bool + """ + + _validation = { + 'uri': {'required': True}, + } + + _attribute_map = { + 'repositories': {'key': 'repositories', 'type': '[GitPatternRepository]'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'search_paths': {'key': 'searchPaths', 'type': '[str]'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'host_key': {'key': 'hostKey', 'type': 'str'}, + 'host_key_algorithm': {'key': 'hostKeyAlgorithm', 'type': 'str'}, + 'private_key': {'key': 'privateKey', 'type': 'str'}, + 'strict_host_key_checking': {'key': 'strictHostKeyChecking', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ConfigServerGitProperty, self).__init__(**kwargs) + self.repositories = kwargs.get('repositories', None) + self.uri = kwargs.get('uri', None) + self.label = kwargs.get('label', None) + self.search_paths = kwargs.get('search_paths', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.host_key = kwargs.get('host_key', None) + self.host_key_algorithm = kwargs.get('host_key_algorithm', None) + self.private_key = kwargs.get('private_key', None) + self.strict_host_key_checking = kwargs.get('strict_host_key_checking', None) + + +class ConfigServerProperties(Model): + """Config server git properties payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provisioning_state: State of the config server. Possible values + include: 'NotAvailable', 'Deleted', 'Failed', 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerState + :param error: Error when apply config server settings. + :type error: ~azure.mgmt.appplatform.v2021_06_01_preview.models.Error + :param config_server: Settings of config server. + :type config_server: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerSettings + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'config_server': {'key': 'configServer', 'type': 'ConfigServerSettings'}, + } + + def __init__(self, **kwargs): + super(ConfigServerProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.error = kwargs.get('error', None) + self.config_server = kwargs.get('config_server', None) + + +class ConfigServerResource(ProxyResource): + """Config Server resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the Config Server resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ConfigServerProperties'}, + } + + def __init__(self, **kwargs): + super(ConfigServerResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ConfigServerSettings(Model): + """The settings of config server. + + :param git_property: Property of git environment. + :type git_property: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerGitProperty + """ + + _attribute_map = { + 'git_property': {'key': 'gitProperty', 'type': 'ConfigServerGitProperty'}, + } + + def __init__(self, **kwargs): + super(ConfigServerSettings, self).__init__(**kwargs) + self.git_property = kwargs.get('git_property', None) + + +class ConfigServerSettingsErrorRecord(Model): + """Error record of the config server settings. + + :param name: The name of the config server settings error record + :type name: str + :param uri: The uri of the config server settings error record + :type uri: str + :param messages: The detail error messages of the record + :type messages: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'messages': {'key': 'messages', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ConfigServerSettingsErrorRecord, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.uri = kwargs.get('uri', None) + self.messages = kwargs.get('messages', None) + + +class ConfigServerSettingsValidateResult(Model): + """Validation result for config server settings. + + :param is_valid: Indicate if the config server settings are valid + :type is_valid: bool + :param details: The detail validation results + :type details: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerSettingsErrorRecord] + """ + + _attribute_map = { + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'details': {'key': 'details', 'type': '[ConfigServerSettingsErrorRecord]'}, + } + + def __init__(self, **kwargs): + super(ConfigServerSettingsValidateResult, self).__init__(**kwargs) + self.is_valid = kwargs.get('is_valid', None) + self.details = kwargs.get('details', None) + + +class CustomDomainProperties(Model): + """Custom domain of app resource payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param thumbprint: The thumbprint of bound certificate. + :type thumbprint: str + :ivar app_name: The app name of domain. + :vartype app_name: str + :param cert_name: The bound certificate name of domain. + :type cert_name: str + """ + + _validation = { + 'app_name': {'readonly': True}, + } + + _attribute_map = { + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'app_name': {'key': 'appName', 'type': 'str'}, + 'cert_name': {'key': 'certName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomDomainProperties, self).__init__(**kwargs) + self.thumbprint = kwargs.get('thumbprint', None) + self.app_name = None + self.cert_name = kwargs.get('cert_name', None) + + +class CustomDomainResource(ProxyResource): + """Custom domain resource payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the custom domain resource. + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.CustomDomainProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CustomDomainProperties'}, + } + + def __init__(self, **kwargs): + super(CustomDomainResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class CustomDomainValidatePayload(Model): + """Custom domain validate payload. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name to be validated + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomDomainValidatePayload, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class CustomDomainValidateResult(Model): + """Validation result for custom domain. + + :param is_valid: Indicates if domain name is valid. + :type is_valid: bool + :param message: Message of why domain name is invalid. + :type message: str + """ + + _attribute_map = { + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomDomainValidateResult, self).__init__(**kwargs) + self.is_valid = kwargs.get('is_valid', None) + self.message = kwargs.get('message', None) + + +class DeploymentInstance(Model): + """Deployment instance payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the deployment instance + :vartype name: str + :ivar status: Status of the deployment instance + :vartype status: str + :ivar reason: Failed reason of the deployment instance + :vartype reason: str + :ivar discovery_status: Discovery status of the deployment instance + :vartype discovery_status: str + :ivar start_time: Start time of the deployment instance + :vartype start_time: str + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'reason': {'readonly': True}, + 'discovery_status': {'readonly': True}, + 'start_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'discovery_status': {'key': 'discoveryStatus', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeploymentInstance, self).__init__(**kwargs) + self.name = None + self.status = None + self.reason = None + self.discovery_status = None + self.start_time = None + + +class DeploymentResource(ProxyResource): + """Deployment resource payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the Deployment resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentResourceProperties + :param sku: Sku of the Deployment resource + :type sku: ~azure.mgmt.appplatform.v2021_06_01_preview.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DeploymentResourceProperties'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(DeploymentResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.sku = kwargs.get('sku', None) + + +class DeploymentResourceProperties(Model): + """Deployment resource properties payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param source: Uploaded source information of the deployment. + :type source: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.UserSourceInfo + :ivar app_name: App name of the deployment + :vartype app_name: str + :param deployment_settings: Deployment settings of the Deployment + :type deployment_settings: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentSettings + :ivar provisioning_state: Provisioning state of the Deployment. Possible + values include: 'Creating', 'Updating', 'Succeeded', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentResourceProvisioningState + :ivar status: Status of the Deployment. Possible values include: + 'Unknown', 'Stopped', 'Running', 'Failed', 'Allocating', 'Upgrading', + 'Compiling' + :vartype status: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentResourceStatus + :ivar active: Indicates whether the Deployment is active + :vartype active: bool + :ivar created_time: Date time when the resource is created + :vartype created_time: datetime + :ivar instances: Collection of instances belong to the Deployment + :vartype instances: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentInstance] + """ + + _validation = { + 'app_name': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'active': {'readonly': True}, + 'created_time': {'readonly': True}, + 'instances': {'readonly': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'UserSourceInfo'}, + 'app_name': {'key': 'appName', 'type': 'str'}, + 'deployment_settings': {'key': 'deploymentSettings', 'type': 'DeploymentSettings'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'active': {'key': 'active', 'type': 'bool'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'instances': {'key': 'instances', 'type': '[DeploymentInstance]'}, + } + + def __init__(self, **kwargs): + super(DeploymentResourceProperties, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.app_name = None + self.deployment_settings = kwargs.get('deployment_settings', None) + self.provisioning_state = None + self.status = None + self.active = None + self.created_time = None + self.instances = None + + +class DeploymentSettings(Model): + """Deployment settings payload. + + :param cpu: Required CPU. This should be 1 for Basic tier, and in range + [1, 4] for Standard tier. This is deprecated starting from API version + 2021-06-01-preview. Please use the resourceRequests field to set the CPU + size. Default value: 1 . + :type cpu: int + :param memory_in_gb: Required Memory size in GB. This should be in range + [1, 2] for Basic tier, and in range [1, 8] for Standard tier. This is + deprecated starting from API version 2021-06-01-preview. Please use the + resourceRequests field to set the the memory size. Default value: 1 . + :type memory_in_gb: int + :param resource_requests: The requested resource quantity for required CPU + and Memory. It is recommended that using this field to represent the + required CPU and Memory, the old field cpu and memoryInGB will be + deprecated later. + :type resource_requests: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceRequests + :param jvm_options: JVM parameter + :type jvm_options: str + :param net_core_main_entry_path: The path to the .NET executable relative + to zip root + :type net_core_main_entry_path: str + :param environment_variables: Collection of environment variables + :type environment_variables: dict[str, str] + :param runtime_version: Runtime version. Possible values include: + 'Java_8', 'Java_11', 'NetCore_31' + :type runtime_version: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.RuntimeVersion + """ + + _attribute_map = { + 'cpu': {'key': 'cpu', 'type': 'int'}, + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'int'}, + 'resource_requests': {'key': 'resourceRequests', 'type': 'ResourceRequests'}, + 'jvm_options': {'key': 'jvmOptions', 'type': 'str'}, + 'net_core_main_entry_path': {'key': 'netCoreMainEntryPath', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeploymentSettings, self).__init__(**kwargs) + self.cpu = kwargs.get('cpu', 1) + self.memory_in_gb = kwargs.get('memory_in_gb', 1) + self.resource_requests = kwargs.get('resource_requests', None) + self.jvm_options = kwargs.get('jvm_options', None) + self.net_core_main_entry_path = kwargs.get('net_core_main_entry_path', None) + self.environment_variables = kwargs.get('environment_variables', None) + self.runtime_version = kwargs.get('runtime_version', None) + + +class Error(Model): + """The error code compose of code and message. + + :param code: The code of error. + :type code: str + :param message: The message of error. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Error, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class GitPatternRepository(Model): + """Git repository property payload. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the repository + :type name: str + :param pattern: Collection of pattern of the repository + :type pattern: list[str] + :param uri: Required. URI of the repository + :type uri: str + :param label: Label of the repository + :type label: str + :param search_paths: Searching path of the repository + :type search_paths: list[str] + :param username: Username of git repository basic auth. + :type username: str + :param password: Password of git repository basic auth. + :type password: str + :param host_key: Public sshKey of git repository. + :type host_key: str + :param host_key_algorithm: SshKey algorithm of git repository. + :type host_key_algorithm: str + :param private_key: Private sshKey algorithm of git repository. + :type private_key: str + :param strict_host_key_checking: Strict host key checking or not. + :type strict_host_key_checking: bool + """ + + _validation = { + 'name': {'required': True}, + 'uri': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'pattern': {'key': 'pattern', 'type': '[str]'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'search_paths': {'key': 'searchPaths', 'type': '[str]'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'host_key': {'key': 'hostKey', 'type': 'str'}, + 'host_key_algorithm': {'key': 'hostKeyAlgorithm', 'type': 'str'}, + 'private_key': {'key': 'privateKey', 'type': 'str'}, + 'strict_host_key_checking': {'key': 'strictHostKeyChecking', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(GitPatternRepository, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.pattern = kwargs.get('pattern', None) + self.uri = kwargs.get('uri', None) + self.label = kwargs.get('label', None) + self.search_paths = kwargs.get('search_paths', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.host_key = kwargs.get('host_key', None) + self.host_key_algorithm = kwargs.get('host_key_algorithm', None) + self.private_key = kwargs.get('private_key', None) + self.strict_host_key_checking = kwargs.get('strict_host_key_checking', None) + + +class LogFileUrlResponse(Model): + """Log file URL payload. + + All required parameters must be populated in order to send to Azure. + + :param url: Required. URL of the log file + :type url: str + """ + + _validation = { + 'url': {'required': True}, + } + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogFileUrlResponse, self).__init__(**kwargs) + self.url = kwargs.get('url', None) + + +class LogSpecification(Model): + """Specifications of the Log for Azure Monitoring. + + :param name: Name of the log + :type name: str + :param display_name: Localized friendly display name of the log + :type display_name: str + :param blob_duration: Blob duration of the log + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.blob_duration = kwargs.get('blob_duration', None) + + +class ManagedIdentityProperties(Model): + """Managed identity properties retrieved from ARM request headers. + + :param type: Type of the managed identity. Possible values include: + 'None', 'SystemAssigned', 'UserAssigned', 'SystemAssigned,UserAssigned' + :type type: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ManagedIdentityType + :param principal_id: Principal Id + :type principal_id: str + :param tenant_id: Tenant Id + :type tenant_id: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedIdentityProperties, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + + +class MetricDimension(Model): + """Specifications of the Dimension of metrics. + + :param name: Name of the dimension + :type name: str + :param display_name: Localized friendly display name of the dimension + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricDimension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + + +class MetricSpecification(Model): + """Specifications of the Metrics for Azure Monitoring. + + :param name: Name of the metric + :type name: str + :param display_name: Localized friendly display name of the metric + :type display_name: str + :param display_description: Localized friendly description of the metric + :type display_description: str + :param unit: Unit that makes sense for the metric + :type unit: str + :param category: Name of the metric category that the metric belongs to. A + metric can only belong to a single category. + :type category: str + :param aggregation_type: Only provide one value for this field. Valid + values: Average, Minimum, Maximum, Total, Count. + :type aggregation_type: str + :param supported_aggregation_types: Supported aggregation types + :type supported_aggregation_types: list[str] + :param supported_time_grain_types: Supported time grain types + :type supported_time_grain_types: list[str] + :param fill_gap_with_zero: Optional. If set to true, then zero will be + returned for time duration where no metric is emitted/published. + :type fill_gap_with_zero: bool + :param dimensions: Dimensions of the metric + :type dimensions: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.MetricDimension] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + } + + def __init__(self, **kwargs): + super(MetricSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.display_description = kwargs.get('display_description', None) + self.unit = kwargs.get('unit', None) + self.category = kwargs.get('category', None) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) + self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) + self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) + self.dimensions = kwargs.get('dimensions', None) + + +class MonitoringSettingProperties(Model): + """Monitoring Setting properties payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provisioning_state: State of the Monitoring Setting. Possible values + include: 'NotAvailable', 'Failed', 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.MonitoringSettingState + :param error: Error when apply Monitoring Setting changes. + :type error: ~azure.mgmt.appplatform.v2021_06_01_preview.models.Error + :param trace_enabled: Indicates whether enable the trace functionality, + which will be deprecated since api version 2020-11-01-preview. Please + leverage appInsightsInstrumentationKey to indicate if monitoringSettings + enabled or not + :type trace_enabled: bool + :param app_insights_instrumentation_key: Target application insight + instrumentation key, null or whitespace include empty will disable + monitoringSettings + :type app_insights_instrumentation_key: str + :param app_insights_sampling_rate: Indicates the sampling rate of + application insight agent, should be in range [0.0, 100.0] + :type app_insights_sampling_rate: float + :param app_insights_agent_versions: Indicates the versions of application + insight agent + :type app_insights_agent_versions: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ApplicationInsightsAgentVersions + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'app_insights_sampling_rate': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'trace_enabled': {'key': 'traceEnabled', 'type': 'bool'}, + 'app_insights_instrumentation_key': {'key': 'appInsightsInstrumentationKey', 'type': 'str'}, + 'app_insights_sampling_rate': {'key': 'appInsightsSamplingRate', 'type': 'float'}, + 'app_insights_agent_versions': {'key': 'appInsightsAgentVersions', 'type': 'ApplicationInsightsAgentVersions'}, + } + + def __init__(self, **kwargs): + super(MonitoringSettingProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.error = kwargs.get('error', None) + self.trace_enabled = kwargs.get('trace_enabled', None) + self.app_insights_instrumentation_key = kwargs.get('app_insights_instrumentation_key', None) + self.app_insights_sampling_rate = kwargs.get('app_insights_sampling_rate', None) + self.app_insights_agent_versions = kwargs.get('app_insights_agent_versions', None) + + +class MonitoringSettingResource(ProxyResource): + """Monitoring Setting resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the Monitoring Setting resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.MonitoringSettingProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'MonitoringSettingProperties'}, + } + + def __init__(self, **kwargs): + super(MonitoringSettingResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class NameAvailability(Model): + """Name availability result payload. + + :param name_available: Indicates whether the name is available + :type name_available: bool + :param reason: Reason why the name is not available + :type reason: str + :param message: Message why the name is not available + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NameAvailability, self).__init__(**kwargs) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) + + +class NameAvailabilityParameters(Model): + """Name availability parameters payload. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of the resource to check name availability + :type type: str + :param name: Required. Name to be checked + :type name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NameAvailabilityParameters, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.name = kwargs.get('name', None) + + +class NetworkProfile(Model): + """Service network profile payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param service_runtime_subnet_id: Fully qualified resource Id of the + subnet to host Azure Spring Cloud Service Runtime + :type service_runtime_subnet_id: str + :param app_subnet_id: Fully qualified resource Id of the subnet to host + Azure Spring Cloud Apps + :type app_subnet_id: str + :param service_cidr: Azure Spring Cloud service reserved CIDR + :type service_cidr: str + :param service_runtime_network_resource_group: Name of the resource group + containing network resources of Azure Spring Cloud Service Runtime + :type service_runtime_network_resource_group: str + :param app_network_resource_group: Name of the resource group containing + network resources of Azure Spring Cloud Apps + :type app_network_resource_group: str + :ivar outbound_ips: Desired outbound IP resources for Azure Spring Cloud + instance. + :vartype outbound_ips: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.NetworkProfileOutboundIPs + :ivar required_traffics: Required inbound or outbound traffics for Azure + Spring Cloud instance. + :vartype required_traffics: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.RequiredTraffic] + """ + + _validation = { + 'outbound_ips': {'readonly': True}, + 'required_traffics': {'readonly': True}, + } + + _attribute_map = { + 'service_runtime_subnet_id': {'key': 'serviceRuntimeSubnetId', 'type': 'str'}, + 'app_subnet_id': {'key': 'appSubnetId', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + 'service_runtime_network_resource_group': {'key': 'serviceRuntimeNetworkResourceGroup', 'type': 'str'}, + 'app_network_resource_group': {'key': 'appNetworkResourceGroup', 'type': 'str'}, + 'outbound_ips': {'key': 'outboundIPs', 'type': 'NetworkProfileOutboundIPs'}, + 'required_traffics': {'key': 'requiredTraffics', 'type': '[RequiredTraffic]'}, + } + + def __init__(self, **kwargs): + super(NetworkProfile, self).__init__(**kwargs) + self.service_runtime_subnet_id = kwargs.get('service_runtime_subnet_id', None) + self.app_subnet_id = kwargs.get('app_subnet_id', None) + self.service_cidr = kwargs.get('service_cidr', None) + self.service_runtime_network_resource_group = kwargs.get('service_runtime_network_resource_group', None) + self.app_network_resource_group = kwargs.get('app_network_resource_group', None) + self.outbound_ips = None + self.required_traffics = None + + +class NetworkProfileOutboundIPs(Model): + """Desired outbound IP resources for Azure Spring Cloud instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar public_ips: A list of public IP addresses. + :vartype public_ips: list[str] + """ + + _validation = { + 'public_ips': {'readonly': True}, + } + + _attribute_map = { + 'public_ips': {'key': 'publicIPs', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(NetworkProfileOutboundIPs, self).__init__(**kwargs) + self.public_ips = None + + +class OperationDetail(Model): + """Operation detail payload. + + :param name: Name of the operation + :type name: str + :param is_data_action: Indicates whether the operation is a data action + :type is_data_action: bool + :param display: Display of the operation + :type display: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.OperationDisplay + :param origin: Origin of the operation + :type origin: str + :param properties: Properties of the operation + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.OperationProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OperationProperties'}, + } + + def __init__(self, **kwargs): + super(OperationDetail, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.is_data_action = kwargs.get('is_data_action', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) + + +class OperationDisplay(Model): + """Operation display payload. + + :param provider: Resource provider of the operation + :type provider: str + :param resource: Resource of the operation + :type resource: str + :param operation: Localized friendly name for the operation + :type operation: str + :param description: Localized friendly description for the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationProperties(Model): + """Extra Operation properties. + + :param service_specification: Service specifications of the operation + :type service_specification: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, **kwargs): + super(OperationProperties, self).__init__(**kwargs) + self.service_specification = kwargs.get('service_specification', None) + + +class PersistentDisk(Model): + """Persistent disk payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param size_in_gb: Size of the persistent disk in GB + :type size_in_gb: int + :ivar used_in_gb: Size of the used persistent disk in GB + :vartype used_in_gb: int + :param mount_path: Mount path of the persistent disk + :type mount_path: str + """ + + _validation = { + 'size_in_gb': {'maximum': 50, 'minimum': 0}, + 'used_in_gb': {'readonly': True, 'maximum': 50, 'minimum': 0}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'used_in_gb': {'key': 'usedInGB', 'type': 'int'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PersistentDisk, self).__init__(**kwargs) + self.size_in_gb = kwargs.get('size_in_gb', None) + self.used_in_gb = None + self.mount_path = kwargs.get('mount_path', None) + + +class RegenerateTestKeyRequestPayload(Model): + """Regenerate test key request payload. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. Type of the test key. Possible values include: + 'Primary', 'Secondary' + :type key_type: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.TestKeyType + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegenerateTestKeyRequestPayload, self).__init__(**kwargs) + self.key_type = kwargs.get('key_type', None) + + +class RequiredTraffic(Model): + """Required inbound or outbound traffic for Azure Spring Cloud instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar protocol: The protocol of required traffic + :vartype protocol: str + :ivar port: The port of required traffic + :vartype port: int + :ivar ips: The ip list of required traffic + :vartype ips: list[str] + :ivar fqdns: The FQDN list of required traffic + :vartype fqdns: list[str] + :ivar direction: The direction of required traffic. Possible values + include: 'Inbound', 'Outbound' + :vartype direction: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.TrafficDirection + """ + + _validation = { + 'protocol': {'readonly': True}, + 'port': {'readonly': True}, + 'ips': {'readonly': True}, + 'fqdns': {'readonly': True}, + 'direction': {'readonly': True}, + } + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'ips': {'key': 'ips', 'type': '[str]'}, + 'fqdns': {'key': 'fqdns', 'type': '[str]'}, + 'direction': {'key': 'direction', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RequiredTraffic, self).__init__(**kwargs) + self.protocol = None + self.port = None + self.ips = None + self.fqdns = None + self.direction = None + + +class ResourceRequests(Model): + """Deployment resource request payload. + + :param cpu: Required CPU. 1 core can be represented by 1 or 1000m. This + should be 500m or 1 for Basic tier, and {500m, 1, 2, 3, 4} for Standard + tier. + :type cpu: str + :param memory: Required memory. 1 GB can be represented by 1Gi or 1024Mi. + This should be {512Mi, 1Gi, 2Gi} for Basic tier, and {512Mi, 1Gi, 2Gi, + ..., 8Gi} for Standard tier. + :type memory: str + """ + + _attribute_map = { + 'cpu': {'key': 'cpu', 'type': 'str'}, + 'memory': {'key': 'memory', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceRequests, self).__init__(**kwargs) + self.cpu = kwargs.get('cpu', None) + self.memory = kwargs.get('memory', None) + + +class ResourceSku(Model): + """Describes an available Azure Spring Cloud SKU. + + :param resource_type: Gets the type of resource the SKU applies to. + :type resource_type: str + :param name: Gets the name of SKU. + :type name: str + :param tier: Gets the tier of SKU. + :type tier: str + :param capacity: Gets the capacity of SKU. + :type capacity: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.SkuCapacity + :param locations: Gets the set of locations that the SKU is available. + :type locations: list[str] + :param location_info: Gets a list of locations and availability zones in + those locations where the SKU is available. + :type location_info: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceSkuLocationInfo] + :param restrictions: Gets the restrictions because of which SKU cannot be + used. This is + empty if there are no restrictions. + :type restrictions: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceSkuRestrictions] + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'SkuCapacity'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__(self, **kwargs): + super(ResourceSku, self).__init__(**kwargs) + self.resource_type = kwargs.get('resource_type', None) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.capacity = kwargs.get('capacity', None) + self.locations = kwargs.get('locations', None) + self.location_info = kwargs.get('location_info', None) + self.restrictions = kwargs.get('restrictions', None) + + +class ResourceSkuCapabilities(Model): + """ResourceSkuCapabilities. + + :param name: Gets an invariant to describe the feature. + :type name: str + :param value: Gets an invariant if the feature is measured by quantity. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuCapabilities, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ResourceSkuLocationInfo(Model): + """Locations and availability zones where the SKU is available. + + :param location: Gets location of the SKU + :type location: str + :param zones: Gets list of availability zones where the SKU is supported. + :type zones: list[str] + :param zone_details: Gets details of capabilities available to a SKU in + specific zones. + :type zone_details: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceSkuZoneDetails] + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'zone_details': {'key': 'zoneDetails', 'type': '[ResourceSkuZoneDetails]'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuLocationInfo, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.zones = kwargs.get('zones', None) + self.zone_details = kwargs.get('zone_details', None) + + +class ResourceSkuRestrictionInfo(Model): + """Information about the restriction where the SKU cannot be used. + + :param locations: Gets locations where the SKU is restricted + :type locations: list[str] + :param zones: Gets list of availability zones where the SKU is restricted. + :type zones: list[str] + """ + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) + self.locations = kwargs.get('locations', None) + self.zones = kwargs.get('zones', None) + + +class ResourceSkuRestrictions(Model): + """Restrictions where the SKU cannot be used. + + :param type: Gets the type of restrictions. Possible values include: + 'Location', 'Zone' + :type type: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceSkuRestrictionsType + :param values: Gets the value of restrictions. If the restriction type is + set to + location. This would be different locations where the SKU is restricted. + :type values: list[str] + :param restriction_info: Gets the information about the restriction where + the SKU cannot be used. + :type restriction_info: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceSkuRestrictionInfo + :param reason_code: Gets the reason for restriction. Possible values + include: 'QuotaId', 'NotAvailableForSubscription' + :type reason_code: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceSkuRestrictionsReasonCode + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.values = kwargs.get('values', None) + self.restriction_info = kwargs.get('restriction_info', None) + self.reason_code = kwargs.get('reason_code', None) + + +class ResourceSkuZoneDetails(Model): + """Details of capabilities available to a SKU in specific zones. + + :param name: Gets the set of zones that the SKU is available in with the + specified capabilities. + :type name: list[str] + :param capabilities: Gets a list of capabilities that are available for + the SKU in the + specified list of zones. + :type capabilities: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceSkuCapabilities] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuZoneDetails, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.capabilities = kwargs.get('capabilities', None) + + +class ResourceUploadDefinition(Model): + """Resource upload definition payload. + + :param relative_path: Source relative path + :type relative_path: str + :param upload_url: Upload URL + :type upload_url: str + """ + + _attribute_map = { + 'relative_path': {'key': 'relativePath', 'type': 'str'}, + 'upload_url': {'key': 'uploadUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceUploadDefinition, self).__init__(**kwargs) + self.relative_path = kwargs.get('relative_path', None) + self.upload_url = kwargs.get('upload_url', None) + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The GEO location of the resource. + :type location: str + :param tags: Tags of the service which is a list of key value pairs that + describe the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ServiceResource(TrackedResource): + """Service resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The GEO location of the resource. + :type location: str + :param tags: Tags of the service which is a list of key value pairs that + describe the resource. + :type tags: dict[str, str] + :param properties: Properties of the Service resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ClusterResourceProperties + :param sku: Sku of the Service resource + :type sku: ~azure.mgmt.appplatform.v2021_06_01_preview.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ClusterResourceProperties'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(ServiceResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.sku = kwargs.get('sku', None) + + +class ServiceSpecification(Model): + """Service specification payload. + + :param log_specifications: Specifications of the Log for Azure Monitoring + :type log_specifications: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.LogSpecification] + :param metric_specifications: Specifications of the Metrics for Azure + Monitoring + :type metric_specifications: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.MetricSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, **kwargs): + super(ServiceSpecification, self).__init__(**kwargs) + self.log_specifications = kwargs.get('log_specifications', None) + self.metric_specifications = kwargs.get('metric_specifications', None) + + +class Sku(Model): + """Sku of Azure Spring Cloud. + + :param name: Name of the Sku. Default value: "S0" . + :type name: str + :param tier: Tier of the Sku. Default value: "Standard" . + :type tier: str + :param capacity: Current capacity of the target resource + :type capacity: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', "S0") + self.tier = kwargs.get('tier', "Standard") + self.capacity = kwargs.get('capacity', None) + + +class SkuCapacity(Model): + """The SKU capacity. + + All required parameters must be populated in order to send to Azure. + + :param minimum: Required. Gets or sets the minimum. + :type minimum: int + :param maximum: Gets or sets the maximum. + :type maximum: int + :param default: Gets or sets the default. + :type default: int + :param scale_type: Gets or sets the type of the scale. Possible values + include: 'None', 'Manual', 'Automatic' + :type scale_type: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.SkuScaleType + """ + + _validation = { + 'minimum': {'required': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = kwargs.get('minimum', None) + self.maximum = kwargs.get('maximum', None) + self.default = kwargs.get('default', None) + self.scale_type = kwargs.get('scale_type', None) + + +class SupportedRuntimeVersion(Model): + """Supported deployment runtime version descriptor. + + :param value: The raw value which could be passed to deployment CRUD + operations. Possible values include: 'Java_8', 'Java_11', 'NetCore_31' + :type value: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.SupportedRuntimeValue + :param platform: The platform of this runtime version (possible values: + "Java" or ".NET"). Possible values include: 'Java', '.NET Core' + :type platform: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.SupportedRuntimePlatform + :param version: The detailed version (major.minor) of the platform. + :type version: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'platform': {'key': 'platform', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SupportedRuntimeVersion, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.platform = kwargs.get('platform', None) + self.version = kwargs.get('version', None) + + +class TemporaryDisk(Model): + """Temporary disk payload. + + :param size_in_gb: Size of the temporary disk in GB + :type size_in_gb: int + :param mount_path: Mount path of the temporary disk + :type mount_path: str + """ + + _validation = { + 'size_in_gb': {'maximum': 5, 'minimum': 0}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TemporaryDisk, self).__init__(**kwargs) + self.size_in_gb = kwargs.get('size_in_gb', None) + self.mount_path = kwargs.get('mount_path', None) + + +class TestKeys(Model): + """Test keys payload. + + :param primary_key: Primary key + :type primary_key: str + :param secondary_key: Secondary key + :type secondary_key: str + :param primary_test_endpoint: Primary test endpoint + :type primary_test_endpoint: str + :param secondary_test_endpoint: Secondary test endpoint + :type secondary_test_endpoint: str + :param enabled: Indicates whether the test endpoint feature enabled or not + :type enabled: bool + """ + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'primary_test_endpoint': {'key': 'primaryTestEndpoint', 'type': 'str'}, + 'secondary_test_endpoint': {'key': 'secondaryTestEndpoint', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(TestKeys, self).__init__(**kwargs) + self.primary_key = kwargs.get('primary_key', None) + self.secondary_key = kwargs.get('secondary_key', None) + self.primary_test_endpoint = kwargs.get('primary_test_endpoint', None) + self.secondary_test_endpoint = kwargs.get('secondary_test_endpoint', None) + self.enabled = kwargs.get('enabled', None) + + +class UserSourceInfo(Model): + """Source information for a deployment. + + :param type: Type of the source uploaded. Possible values include: 'Jar', + 'NetCoreZip', 'Source' + :type type: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.UserSourceType + :param relative_path: Relative path of the storage which stores the source + :type relative_path: str + :param version: Version of the source + :type version: str + :param artifact_selector: Selector for the artifact to be used for the + deployment for multi-module projects. This should be + the relative path to the target module/project. + :type artifact_selector: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'relative_path': {'key': 'relativePath', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'artifact_selector': {'key': 'artifactSelector', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserSourceInfo, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.relative_path = kwargs.get('relative_path', None) + self.version = kwargs.get('version', None) + self.artifact_selector = kwargs.get('artifact_selector', None) diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models_py3.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models_py3.py new file mode 100644 index 00000000000..5efc5bf4c4b --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_models_py3.py @@ -0,0 +1,2160 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ApplicationInsightsAgentVersions(Model): + """Application Insights agent versions properties payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar java: Indicates the version of application insight java agent + :vartype java: str + """ + + _validation = { + 'java': {'readonly': True}, + } + + _attribute_map = { + 'java': {'key': 'java', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ApplicationInsightsAgentVersions, self).__init__(**kwargs) + self.java = None + + +class Resource(Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + + +class AppResource(ProxyResource): + """App resource payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the App resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.AppResourceProperties + :param identity: The Managed Identity type of the app resource + :type identity: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ManagedIdentityProperties + :param location: The GEO location of the application, always the same with + its parent resource + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AppResourceProperties'}, + 'identity': {'key': 'identity', 'type': 'ManagedIdentityProperties'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, properties=None, identity=None, location: str=None, **kwargs) -> None: + super(AppResource, self).__init__(**kwargs) + self.properties = properties + self.identity = identity + self.location = location + + +class AppResourceProperties(Model): + """App resource properties payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param public: Indicates whether the App exposes public endpoint + :type public: bool + :ivar url: URL of the App + :vartype url: str + :ivar provisioning_state: Provisioning state of the App. Possible values + include: 'Succeeded', 'Failed', 'Creating', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.AppResourceProvisioningState + :param active_deployment_name: Name of the active deployment of the App + :type active_deployment_name: str + :param fqdn: Fully qualified dns Name. + :type fqdn: str + :param https_only: Indicate if only https is allowed. + :type https_only: bool + :ivar created_time: Date time when the resource is created + :vartype created_time: datetime + :param temporary_disk: Temporary disk settings + :type temporary_disk: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.TemporaryDisk + :param persistent_disk: Persistent disk settings + :type persistent_disk: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.PersistentDisk + :param enable_end_to_end_tls: Indicate if end to end TLS is enabled. + :type enable_end_to_end_tls: bool + """ + + _validation = { + 'url': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_time': {'readonly': True}, + } + + _attribute_map = { + 'public': {'key': 'public', 'type': 'bool'}, + 'url': {'key': 'url', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'active_deployment_name': {'key': 'activeDeploymentName', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'https_only': {'key': 'httpsOnly', 'type': 'bool'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'temporary_disk': {'key': 'temporaryDisk', 'type': 'TemporaryDisk'}, + 'persistent_disk': {'key': 'persistentDisk', 'type': 'PersistentDisk'}, + 'enable_end_to_end_tls': {'key': 'enableEndToEndTLS', 'type': 'bool'}, + } + + def __init__(self, *, public: bool=None, active_deployment_name: str=None, fqdn: str=None, https_only: bool=None, temporary_disk=None, persistent_disk=None, enable_end_to_end_tls: bool=None, **kwargs) -> None: + super(AppResourceProperties, self).__init__(**kwargs) + self.public = public + self.url = None + self.provisioning_state = None + self.active_deployment_name = active_deployment_name + self.fqdn = fqdn + self.https_only = https_only + self.created_time = None + self.temporary_disk = temporary_disk + self.persistent_disk = persistent_disk + self.enable_end_to_end_tls = enable_end_to_end_tls + + +class AvailableRuntimeVersions(Model): + """AvailableRuntimeVersions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A list of all supported runtime versions. + :vartype value: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.SupportedRuntimeVersion] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SupportedRuntimeVersion]'}, + } + + def __init__(self, **kwargs) -> None: + super(AvailableRuntimeVersions, self).__init__(**kwargs) + self.value = None + + +class BindingResource(ProxyResource): + """Binding resource payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the Binding resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.BindingResourceProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BindingResourceProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(BindingResource, self).__init__(**kwargs) + self.properties = properties + + +class BindingResourceProperties(Model): + """Binding resource properties payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_name: The name of the bound resource + :vartype resource_name: str + :ivar resource_type: The standard Azure resource type of the bound + resource + :vartype resource_type: str + :param resource_id: The Azure resource id of the bound resource + :type resource_id: str + :param key: The key of the bound resource + :type key: str + :param binding_parameters: Binding parameters of the Binding resource + :type binding_parameters: dict[str, object] + :ivar generated_properties: The generated Spring Boot property file for + this binding. The secret will be deducted. + :vartype generated_properties: str + :ivar created_at: Creation time of the Binding resource + :vartype created_at: str + :ivar updated_at: Update time of the Binding resource + :vartype updated_at: str + """ + + _validation = { + 'resource_name': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'generated_properties': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + } + + _attribute_map = { + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + 'binding_parameters': {'key': 'bindingParameters', 'type': '{object}'}, + 'generated_properties': {'key': 'generatedProperties', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'str'}, + 'updated_at': {'key': 'updatedAt', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, key: str=None, binding_parameters=None, **kwargs) -> None: + super(BindingResourceProperties, self).__init__(**kwargs) + self.resource_name = None + self.resource_type = None + self.resource_id = resource_id + self.key = key + self.binding_parameters = binding_parameters + self.generated_properties = None + self.created_at = None + self.updated_at = None + + +class CertificateProperties(Model): + """Certificate resource payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar thumbprint: The thumbprint of certificate. + :vartype thumbprint: str + :param vault_uri: Required. The vault uri of user key vault. + :type vault_uri: str + :param key_vault_cert_name: Required. The certificate name of key vault. + :type key_vault_cert_name: str + :param cert_version: The certificate version of key vault. + :type cert_version: str + :ivar issuer: The issuer of certificate. + :vartype issuer: str + :ivar issued_date: The issue date of certificate. + :vartype issued_date: str + :ivar expiration_date: The expiration date of certificate. + :vartype expiration_date: str + :ivar activate_date: The activate date of certificate. + :vartype activate_date: str + :ivar subject_name: The subject name of certificate. + :vartype subject_name: str + :ivar dns_names: The domain list of certificate. + :vartype dns_names: list[str] + """ + + _validation = { + 'thumbprint': {'readonly': True}, + 'vault_uri': {'required': True}, + 'key_vault_cert_name': {'required': True}, + 'issuer': {'readonly': True}, + 'issued_date': {'readonly': True}, + 'expiration_date': {'readonly': True}, + 'activate_date': {'readonly': True}, + 'subject_name': {'readonly': True}, + 'dns_names': {'readonly': True}, + } + + _attribute_map = { + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'vault_uri': {'key': 'vaultUri', 'type': 'str'}, + 'key_vault_cert_name': {'key': 'keyVaultCertName', 'type': 'str'}, + 'cert_version': {'key': 'certVersion', 'type': 'str'}, + 'issuer': {'key': 'issuer', 'type': 'str'}, + 'issued_date': {'key': 'issuedDate', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'str'}, + 'activate_date': {'key': 'activateDate', 'type': 'str'}, + 'subject_name': {'key': 'subjectName', 'type': 'str'}, + 'dns_names': {'key': 'dnsNames', 'type': '[str]'}, + } + + def __init__(self, *, vault_uri: str, key_vault_cert_name: str, cert_version: str=None, **kwargs) -> None: + super(CertificateProperties, self).__init__(**kwargs) + self.thumbprint = None + self.vault_uri = vault_uri + self.key_vault_cert_name = key_vault_cert_name + self.cert_version = cert_version + self.issuer = None + self.issued_date = None + self.expiration_date = None + self.activate_date = None + self.subject_name = None + self.dns_names = None + + +class CertificateResource(ProxyResource): + """Certificate resource payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the certificate resource payload. + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.CertificateProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CertificateProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(CertificateResource, self).__init__(**kwargs) + self.properties = properties + + +class CloudError(Model): + """An error response from the service. + + :param error: An error response from the service. + :type error: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ClusterResourceProperties(Model): + """Service properties payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provisioning_state: Provisioning state of the Service. Possible + values include: 'Creating', 'Updating', 'Deleting', 'Deleted', + 'Succeeded', 'Failed', 'Moving', 'Moved', 'MoveFailed' + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ProvisioningState + :param network_profile: Network profile of the Service + :type network_profile: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.NetworkProfile + :ivar version: Version of the Service + :vartype version: int + :ivar service_id: ServiceInstanceEntity GUID which uniquely identifies a + created resource + :vartype service_id: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'version': {'readonly': True}, + 'service_id': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'network_profile': {'key': 'networkProfile', 'type': 'NetworkProfile'}, + 'version': {'key': 'version', 'type': 'int'}, + 'service_id': {'key': 'serviceId', 'type': 'str'}, + } + + def __init__(self, *, network_profile=None, **kwargs) -> None: + super(ClusterResourceProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.network_profile = network_profile + self.version = None + self.service_id = None + + +class ConfigServerGitProperty(Model): + """Property of git. + + All required parameters must be populated in order to send to Azure. + + :param repositories: Repositories of git. + :type repositories: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.GitPatternRepository] + :param uri: Required. URI of the repository + :type uri: str + :param label: Label of the repository + :type label: str + :param search_paths: Searching path of the repository + :type search_paths: list[str] + :param username: Username of git repository basic auth. + :type username: str + :param password: Password of git repository basic auth. + :type password: str + :param host_key: Public sshKey of git repository. + :type host_key: str + :param host_key_algorithm: SshKey algorithm of git repository. + :type host_key_algorithm: str + :param private_key: Private sshKey algorithm of git repository. + :type private_key: str + :param strict_host_key_checking: Strict host key checking or not. + :type strict_host_key_checking: bool + """ + + _validation = { + 'uri': {'required': True}, + } + + _attribute_map = { + 'repositories': {'key': 'repositories', 'type': '[GitPatternRepository]'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'search_paths': {'key': 'searchPaths', 'type': '[str]'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'host_key': {'key': 'hostKey', 'type': 'str'}, + 'host_key_algorithm': {'key': 'hostKeyAlgorithm', 'type': 'str'}, + 'private_key': {'key': 'privateKey', 'type': 'str'}, + 'strict_host_key_checking': {'key': 'strictHostKeyChecking', 'type': 'bool'}, + } + + def __init__(self, *, uri: str, repositories=None, label: str=None, search_paths=None, username: str=None, password: str=None, host_key: str=None, host_key_algorithm: str=None, private_key: str=None, strict_host_key_checking: bool=None, **kwargs) -> None: + super(ConfigServerGitProperty, self).__init__(**kwargs) + self.repositories = repositories + self.uri = uri + self.label = label + self.search_paths = search_paths + self.username = username + self.password = password + self.host_key = host_key + self.host_key_algorithm = host_key_algorithm + self.private_key = private_key + self.strict_host_key_checking = strict_host_key_checking + + +class ConfigServerProperties(Model): + """Config server git properties payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provisioning_state: State of the config server. Possible values + include: 'NotAvailable', 'Deleted', 'Failed', 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerState + :param error: Error when apply config server settings. + :type error: ~azure.mgmt.appplatform.v2021_06_01_preview.models.Error + :param config_server: Settings of config server. + :type config_server: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerSettings + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'config_server': {'key': 'configServer', 'type': 'ConfigServerSettings'}, + } + + def __init__(self, *, error=None, config_server=None, **kwargs) -> None: + super(ConfigServerProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.error = error + self.config_server = config_server + + +class ConfigServerResource(ProxyResource): + """Config Server resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the Config Server resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ConfigServerProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(ConfigServerResource, self).__init__(**kwargs) + self.properties = properties + + +class ConfigServerSettings(Model): + """The settings of config server. + + :param git_property: Property of git environment. + :type git_property: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerGitProperty + """ + + _attribute_map = { + 'git_property': {'key': 'gitProperty', 'type': 'ConfigServerGitProperty'}, + } + + def __init__(self, *, git_property=None, **kwargs) -> None: + super(ConfigServerSettings, self).__init__(**kwargs) + self.git_property = git_property + + +class ConfigServerSettingsErrorRecord(Model): + """Error record of the config server settings. + + :param name: The name of the config server settings error record + :type name: str + :param uri: The uri of the config server settings error record + :type uri: str + :param messages: The detail error messages of the record + :type messages: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'messages': {'key': 'messages', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, uri: str=None, messages=None, **kwargs) -> None: + super(ConfigServerSettingsErrorRecord, self).__init__(**kwargs) + self.name = name + self.uri = uri + self.messages = messages + + +class ConfigServerSettingsValidateResult(Model): + """Validation result for config server settings. + + :param is_valid: Indicate if the config server settings are valid + :type is_valid: bool + :param details: The detail validation results + :type details: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerSettingsErrorRecord] + """ + + _attribute_map = { + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'details': {'key': 'details', 'type': '[ConfigServerSettingsErrorRecord]'}, + } + + def __init__(self, *, is_valid: bool=None, details=None, **kwargs) -> None: + super(ConfigServerSettingsValidateResult, self).__init__(**kwargs) + self.is_valid = is_valid + self.details = details + + +class CustomDomainProperties(Model): + """Custom domain of app resource payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param thumbprint: The thumbprint of bound certificate. + :type thumbprint: str + :ivar app_name: The app name of domain. + :vartype app_name: str + :param cert_name: The bound certificate name of domain. + :type cert_name: str + """ + + _validation = { + 'app_name': {'readonly': True}, + } + + _attribute_map = { + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'app_name': {'key': 'appName', 'type': 'str'}, + 'cert_name': {'key': 'certName', 'type': 'str'}, + } + + def __init__(self, *, thumbprint: str=None, cert_name: str=None, **kwargs) -> None: + super(CustomDomainProperties, self).__init__(**kwargs) + self.thumbprint = thumbprint + self.app_name = None + self.cert_name = cert_name + + +class CustomDomainResource(ProxyResource): + """Custom domain resource payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the custom domain resource. + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.CustomDomainProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CustomDomainProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(CustomDomainResource, self).__init__(**kwargs) + self.properties = properties + + +class CustomDomainValidatePayload(Model): + """Custom domain validate payload. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name to be validated + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str, **kwargs) -> None: + super(CustomDomainValidatePayload, self).__init__(**kwargs) + self.name = name + + +class CustomDomainValidateResult(Model): + """Validation result for custom domain. + + :param is_valid: Indicates if domain name is valid. + :type is_valid: bool + :param message: Message of why domain name is invalid. + :type message: str + """ + + _attribute_map = { + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, is_valid: bool=None, message: str=None, **kwargs) -> None: + super(CustomDomainValidateResult, self).__init__(**kwargs) + self.is_valid = is_valid + self.message = message + + +class DeploymentInstance(Model): + """Deployment instance payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the deployment instance + :vartype name: str + :ivar status: Status of the deployment instance + :vartype status: str + :ivar reason: Failed reason of the deployment instance + :vartype reason: str + :ivar discovery_status: Discovery status of the deployment instance + :vartype discovery_status: str + :ivar start_time: Start time of the deployment instance + :vartype start_time: str + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'reason': {'readonly': True}, + 'discovery_status': {'readonly': True}, + 'start_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'discovery_status': {'key': 'discoveryStatus', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DeploymentInstance, self).__init__(**kwargs) + self.name = None + self.status = None + self.reason = None + self.discovery_status = None + self.start_time = None + + +class DeploymentResource(ProxyResource): + """Deployment resource payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the Deployment resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentResourceProperties + :param sku: Sku of the Deployment resource + :type sku: ~azure.mgmt.appplatform.v2021_06_01_preview.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DeploymentResourceProperties'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, properties=None, sku=None, **kwargs) -> None: + super(DeploymentResource, self).__init__(**kwargs) + self.properties = properties + self.sku = sku + + +class DeploymentResourceProperties(Model): + """Deployment resource properties payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param source: Uploaded source information of the deployment. + :type source: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.UserSourceInfo + :ivar app_name: App name of the deployment + :vartype app_name: str + :param deployment_settings: Deployment settings of the Deployment + :type deployment_settings: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentSettings + :ivar provisioning_state: Provisioning state of the Deployment. Possible + values include: 'Creating', 'Updating', 'Succeeded', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentResourceProvisioningState + :ivar status: Status of the Deployment. Possible values include: + 'Unknown', 'Stopped', 'Running', 'Failed', 'Allocating', 'Upgrading', + 'Compiling' + :vartype status: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentResourceStatus + :ivar active: Indicates whether the Deployment is active + :vartype active: bool + :ivar created_time: Date time when the resource is created + :vartype created_time: datetime + :ivar instances: Collection of instances belong to the Deployment + :vartype instances: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentInstance] + """ + + _validation = { + 'app_name': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'active': {'readonly': True}, + 'created_time': {'readonly': True}, + 'instances': {'readonly': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'UserSourceInfo'}, + 'app_name': {'key': 'appName', 'type': 'str'}, + 'deployment_settings': {'key': 'deploymentSettings', 'type': 'DeploymentSettings'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'active': {'key': 'active', 'type': 'bool'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'instances': {'key': 'instances', 'type': '[DeploymentInstance]'}, + } + + def __init__(self, *, source=None, deployment_settings=None, **kwargs) -> None: + super(DeploymentResourceProperties, self).__init__(**kwargs) + self.source = source + self.app_name = None + self.deployment_settings = deployment_settings + self.provisioning_state = None + self.status = None + self.active = None + self.created_time = None + self.instances = None + + +class DeploymentSettings(Model): + """Deployment settings payload. + + :param cpu: Required CPU. This should be 1 for Basic tier, and in range + [1, 4] for Standard tier. This is deprecated starting from API version + 2021-06-01-preview. Please use the resourceRequests field to set the CPU + size. Default value: 1 . + :type cpu: int + :param memory_in_gb: Required Memory size in GB. This should be in range + [1, 2] for Basic tier, and in range [1, 8] for Standard tier. This is + deprecated starting from API version 2021-06-01-preview. Please use the + resourceRequests field to set the the memory size. Default value: 1 . + :type memory_in_gb: int + :param resource_requests: The requested resource quantity for required CPU + and Memory. It is recommended that using this field to represent the + required CPU and Memory, the old field cpu and memoryInGB will be + deprecated later. + :type resource_requests: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceRequests + :param jvm_options: JVM parameter + :type jvm_options: str + :param net_core_main_entry_path: The path to the .NET executable relative + to zip root + :type net_core_main_entry_path: str + :param environment_variables: Collection of environment variables + :type environment_variables: dict[str, str] + :param runtime_version: Runtime version. Possible values include: + 'Java_8', 'Java_11', 'NetCore_31' + :type runtime_version: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.RuntimeVersion + """ + + _attribute_map = { + 'cpu': {'key': 'cpu', 'type': 'int'}, + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'int'}, + 'resource_requests': {'key': 'resourceRequests', 'type': 'ResourceRequests'}, + 'jvm_options': {'key': 'jvmOptions', 'type': 'str'}, + 'net_core_main_entry_path': {'key': 'netCoreMainEntryPath', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + } + + def __init__(self, *, cpu: int=1, memory_in_gb: int=1, resource_requests=None, jvm_options: str=None, net_core_main_entry_path: str=None, environment_variables=None, runtime_version=None, **kwargs) -> None: + super(DeploymentSettings, self).__init__(**kwargs) + self.cpu = cpu + self.memory_in_gb = memory_in_gb + self.resource_requests = resource_requests + self.jvm_options = jvm_options + self.net_core_main_entry_path = net_core_main_entry_path + self.environment_variables = environment_variables + self.runtime_version = runtime_version + + +class Error(Model): + """The error code compose of code and message. + + :param code: The code of error. + :type code: str + :param message: The message of error. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(Error, self).__init__(**kwargs) + self.code = code + self.message = message + + +class GitPatternRepository(Model): + """Git repository property payload. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the repository + :type name: str + :param pattern: Collection of pattern of the repository + :type pattern: list[str] + :param uri: Required. URI of the repository + :type uri: str + :param label: Label of the repository + :type label: str + :param search_paths: Searching path of the repository + :type search_paths: list[str] + :param username: Username of git repository basic auth. + :type username: str + :param password: Password of git repository basic auth. + :type password: str + :param host_key: Public sshKey of git repository. + :type host_key: str + :param host_key_algorithm: SshKey algorithm of git repository. + :type host_key_algorithm: str + :param private_key: Private sshKey algorithm of git repository. + :type private_key: str + :param strict_host_key_checking: Strict host key checking or not. + :type strict_host_key_checking: bool + """ + + _validation = { + 'name': {'required': True}, + 'uri': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'pattern': {'key': 'pattern', 'type': '[str]'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'search_paths': {'key': 'searchPaths', 'type': '[str]'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'host_key': {'key': 'hostKey', 'type': 'str'}, + 'host_key_algorithm': {'key': 'hostKeyAlgorithm', 'type': 'str'}, + 'private_key': {'key': 'privateKey', 'type': 'str'}, + 'strict_host_key_checking': {'key': 'strictHostKeyChecking', 'type': 'bool'}, + } + + def __init__(self, *, name: str, uri: str, pattern=None, label: str=None, search_paths=None, username: str=None, password: str=None, host_key: str=None, host_key_algorithm: str=None, private_key: str=None, strict_host_key_checking: bool=None, **kwargs) -> None: + super(GitPatternRepository, self).__init__(**kwargs) + self.name = name + self.pattern = pattern + self.uri = uri + self.label = label + self.search_paths = search_paths + self.username = username + self.password = password + self.host_key = host_key + self.host_key_algorithm = host_key_algorithm + self.private_key = private_key + self.strict_host_key_checking = strict_host_key_checking + + +class LogFileUrlResponse(Model): + """Log file URL payload. + + All required parameters must be populated in order to send to Azure. + + :param url: Required. URL of the log file + :type url: str + """ + + _validation = { + 'url': {'required': True}, + } + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__(self, *, url: str, **kwargs) -> None: + super(LogFileUrlResponse, self).__init__(**kwargs) + self.url = url + + +class LogSpecification(Model): + """Specifications of the Log for Azure Monitoring. + + :param name: Name of the log + :type name: str + :param display_name: Localized friendly display name of the log + :type display_name: str + :param blob_duration: Blob duration of the log + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, blob_duration: str=None, **kwargs) -> None: + super(LogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration + + +class ManagedIdentityProperties(Model): + """Managed identity properties retrieved from ARM request headers. + + :param type: Type of the managed identity. Possible values include: + 'None', 'SystemAssigned', 'UserAssigned', 'SystemAssigned,UserAssigned' + :type type: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ManagedIdentityType + :param principal_id: Principal Id + :type principal_id: str + :param tenant_id: Tenant Id + :type tenant_id: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, *, type=None, principal_id: str=None, tenant_id: str=None, **kwargs) -> None: + super(ManagedIdentityProperties, self).__init__(**kwargs) + self.type = type + self.principal_id = principal_id + self.tenant_id = tenant_id + + +class MetricDimension(Model): + """Specifications of the Dimension of metrics. + + :param name: Name of the dimension + :type name: str + :param display_name: Localized friendly display name of the dimension + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, **kwargs) -> None: + super(MetricDimension, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + + +class MetricSpecification(Model): + """Specifications of the Metrics for Azure Monitoring. + + :param name: Name of the metric + :type name: str + :param display_name: Localized friendly display name of the metric + :type display_name: str + :param display_description: Localized friendly description of the metric + :type display_description: str + :param unit: Unit that makes sense for the metric + :type unit: str + :param category: Name of the metric category that the metric belongs to. A + metric can only belong to a single category. + :type category: str + :param aggregation_type: Only provide one value for this field. Valid + values: Average, Minimum, Maximum, Total, Count. + :type aggregation_type: str + :param supported_aggregation_types: Supported aggregation types + :type supported_aggregation_types: list[str] + :param supported_time_grain_types: Supported time grain types + :type supported_time_grain_types: list[str] + :param fill_gap_with_zero: Optional. If set to true, then zero will be + returned for time duration where no metric is emitted/published. + :type fill_gap_with_zero: bool + :param dimensions: Dimensions of the metric + :type dimensions: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.MetricDimension] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, category: str=None, aggregation_type: str=None, supported_aggregation_types=None, supported_time_grain_types=None, fill_gap_with_zero: bool=None, dimensions=None, **kwargs) -> None: + super(MetricSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.category = category + self.aggregation_type = aggregation_type + self.supported_aggregation_types = supported_aggregation_types + self.supported_time_grain_types = supported_time_grain_types + self.fill_gap_with_zero = fill_gap_with_zero + self.dimensions = dimensions + + +class MonitoringSettingProperties(Model): + """Monitoring Setting properties payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provisioning_state: State of the Monitoring Setting. Possible values + include: 'NotAvailable', 'Failed', 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.MonitoringSettingState + :param error: Error when apply Monitoring Setting changes. + :type error: ~azure.mgmt.appplatform.v2021_06_01_preview.models.Error + :param trace_enabled: Indicates whether enable the trace functionality, + which will be deprecated since api version 2020-11-01-preview. Please + leverage appInsightsInstrumentationKey to indicate if monitoringSettings + enabled or not + :type trace_enabled: bool + :param app_insights_instrumentation_key: Target application insight + instrumentation key, null or whitespace include empty will disable + monitoringSettings + :type app_insights_instrumentation_key: str + :param app_insights_sampling_rate: Indicates the sampling rate of + application insight agent, should be in range [0.0, 100.0] + :type app_insights_sampling_rate: float + :param app_insights_agent_versions: Indicates the versions of application + insight agent + :type app_insights_agent_versions: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ApplicationInsightsAgentVersions + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'app_insights_sampling_rate': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'trace_enabled': {'key': 'traceEnabled', 'type': 'bool'}, + 'app_insights_instrumentation_key': {'key': 'appInsightsInstrumentationKey', 'type': 'str'}, + 'app_insights_sampling_rate': {'key': 'appInsightsSamplingRate', 'type': 'float'}, + 'app_insights_agent_versions': {'key': 'appInsightsAgentVersions', 'type': 'ApplicationInsightsAgentVersions'}, + } + + def __init__(self, *, error=None, trace_enabled: bool=None, app_insights_instrumentation_key: str=None, app_insights_sampling_rate: float=None, app_insights_agent_versions=None, **kwargs) -> None: + super(MonitoringSettingProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.error = error + self.trace_enabled = trace_enabled + self.app_insights_instrumentation_key = app_insights_instrumentation_key + self.app_insights_sampling_rate = app_insights_sampling_rate + self.app_insights_agent_versions = app_insights_agent_versions + + +class MonitoringSettingResource(ProxyResource): + """Monitoring Setting resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param properties: Properties of the Monitoring Setting resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.MonitoringSettingProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'MonitoringSettingProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(MonitoringSettingResource, self).__init__(**kwargs) + self.properties = properties + + +class NameAvailability(Model): + """Name availability result payload. + + :param name_available: Indicates whether the name is available + :type name_available: bool + :param reason: Reason why the name is not available + :type reason: str + :param message: Message why the name is not available + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, name_available: bool=None, reason: str=None, message: str=None, **kwargs) -> None: + super(NameAvailability, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + +class NameAvailabilityParameters(Model): + """Name availability parameters payload. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of the resource to check name availability + :type type: str + :param name: Required. Name to be checked + :type name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, type: str, name: str, **kwargs) -> None: + super(NameAvailabilityParameters, self).__init__(**kwargs) + self.type = type + self.name = name + + +class NetworkProfile(Model): + """Service network profile payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param service_runtime_subnet_id: Fully qualified resource Id of the + subnet to host Azure Spring Cloud Service Runtime + :type service_runtime_subnet_id: str + :param app_subnet_id: Fully qualified resource Id of the subnet to host + Azure Spring Cloud Apps + :type app_subnet_id: str + :param service_cidr: Azure Spring Cloud service reserved CIDR + :type service_cidr: str + :param service_runtime_network_resource_group: Name of the resource group + containing network resources of Azure Spring Cloud Service Runtime + :type service_runtime_network_resource_group: str + :param app_network_resource_group: Name of the resource group containing + network resources of Azure Spring Cloud Apps + :type app_network_resource_group: str + :ivar outbound_ips: Desired outbound IP resources for Azure Spring Cloud + instance. + :vartype outbound_ips: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.NetworkProfileOutboundIPs + :ivar required_traffics: Required inbound or outbound traffics for Azure + Spring Cloud instance. + :vartype required_traffics: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.RequiredTraffic] + """ + + _validation = { + 'outbound_ips': {'readonly': True}, + 'required_traffics': {'readonly': True}, + } + + _attribute_map = { + 'service_runtime_subnet_id': {'key': 'serviceRuntimeSubnetId', 'type': 'str'}, + 'app_subnet_id': {'key': 'appSubnetId', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + 'service_runtime_network_resource_group': {'key': 'serviceRuntimeNetworkResourceGroup', 'type': 'str'}, + 'app_network_resource_group': {'key': 'appNetworkResourceGroup', 'type': 'str'}, + 'outbound_ips': {'key': 'outboundIPs', 'type': 'NetworkProfileOutboundIPs'}, + 'required_traffics': {'key': 'requiredTraffics', 'type': '[RequiredTraffic]'}, + } + + def __init__(self, *, service_runtime_subnet_id: str=None, app_subnet_id: str=None, service_cidr: str=None, service_runtime_network_resource_group: str=None, app_network_resource_group: str=None, **kwargs) -> None: + super(NetworkProfile, self).__init__(**kwargs) + self.service_runtime_subnet_id = service_runtime_subnet_id + self.app_subnet_id = app_subnet_id + self.service_cidr = service_cidr + self.service_runtime_network_resource_group = service_runtime_network_resource_group + self.app_network_resource_group = app_network_resource_group + self.outbound_ips = None + self.required_traffics = None + + +class NetworkProfileOutboundIPs(Model): + """Desired outbound IP resources for Azure Spring Cloud instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar public_ips: A list of public IP addresses. + :vartype public_ips: list[str] + """ + + _validation = { + 'public_ips': {'readonly': True}, + } + + _attribute_map = { + 'public_ips': {'key': 'publicIPs', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(NetworkProfileOutboundIPs, self).__init__(**kwargs) + self.public_ips = None + + +class OperationDetail(Model): + """Operation detail payload. + + :param name: Name of the operation + :type name: str + :param is_data_action: Indicates whether the operation is a data action + :type is_data_action: bool + :param display: Display of the operation + :type display: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.OperationDisplay + :param origin: Origin of the operation + :type origin: str + :param properties: Properties of the operation + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.OperationProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OperationProperties'}, + } + + def __init__(self, *, name: str=None, is_data_action: bool=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(OperationDetail, self).__init__(**kwargs) + self.name = name + self.is_data_action = is_data_action + self.display = display + self.origin = origin + self.properties = properties + + +class OperationDisplay(Model): + """Operation display payload. + + :param provider: Resource provider of the operation + :type provider: str + :param resource: Resource of the operation + :type resource: str + :param operation: Localized friendly name for the operation + :type operation: str + :param description: Localized friendly description for the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationProperties(Model): + """Extra Operation properties. + + :param service_specification: Service specifications of the operation + :type service_specification: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, service_specification=None, **kwargs) -> None: + super(OperationProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + +class PersistentDisk(Model): + """Persistent disk payload. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param size_in_gb: Size of the persistent disk in GB + :type size_in_gb: int + :ivar used_in_gb: Size of the used persistent disk in GB + :vartype used_in_gb: int + :param mount_path: Mount path of the persistent disk + :type mount_path: str + """ + + _validation = { + 'size_in_gb': {'maximum': 50, 'minimum': 0}, + 'used_in_gb': {'readonly': True, 'maximum': 50, 'minimum': 0}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'used_in_gb': {'key': 'usedInGB', 'type': 'int'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + } + + def __init__(self, *, size_in_gb: int=None, mount_path: str=None, **kwargs) -> None: + super(PersistentDisk, self).__init__(**kwargs) + self.size_in_gb = size_in_gb + self.used_in_gb = None + self.mount_path = mount_path + + +class RegenerateTestKeyRequestPayload(Model): + """Regenerate test key request payload. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. Type of the test key. Possible values include: + 'Primary', 'Secondary' + :type key_type: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.TestKeyType + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'str'}, + } + + def __init__(self, *, key_type, **kwargs) -> None: + super(RegenerateTestKeyRequestPayload, self).__init__(**kwargs) + self.key_type = key_type + + +class RequiredTraffic(Model): + """Required inbound or outbound traffic for Azure Spring Cloud instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar protocol: The protocol of required traffic + :vartype protocol: str + :ivar port: The port of required traffic + :vartype port: int + :ivar ips: The ip list of required traffic + :vartype ips: list[str] + :ivar fqdns: The FQDN list of required traffic + :vartype fqdns: list[str] + :ivar direction: The direction of required traffic. Possible values + include: 'Inbound', 'Outbound' + :vartype direction: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.TrafficDirection + """ + + _validation = { + 'protocol': {'readonly': True}, + 'port': {'readonly': True}, + 'ips': {'readonly': True}, + 'fqdns': {'readonly': True}, + 'direction': {'readonly': True}, + } + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'ips': {'key': 'ips', 'type': '[str]'}, + 'fqdns': {'key': 'fqdns', 'type': '[str]'}, + 'direction': {'key': 'direction', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(RequiredTraffic, self).__init__(**kwargs) + self.protocol = None + self.port = None + self.ips = None + self.fqdns = None + self.direction = None + + +class ResourceRequests(Model): + """Deployment resource request payload. + + :param cpu: Required CPU. 1 core can be represented by 1 or 1000m. This + should be 500m or 1 for Basic tier, and {500m, 1, 2, 3, 4} for Standard + tier. + :type cpu: str + :param memory: Required memory. 1 GB can be represented by 1Gi or 1024Mi. + This should be {512Mi, 1Gi, 2Gi} for Basic tier, and {512Mi, 1Gi, 2Gi, + ..., 8Gi} for Standard tier. + :type memory: str + """ + + _attribute_map = { + 'cpu': {'key': 'cpu', 'type': 'str'}, + 'memory': {'key': 'memory', 'type': 'str'}, + } + + def __init__(self, *, cpu: str=None, memory: str=None, **kwargs) -> None: + super(ResourceRequests, self).__init__(**kwargs) + self.cpu = cpu + self.memory = memory + + +class ResourceSku(Model): + """Describes an available Azure Spring Cloud SKU. + + :param resource_type: Gets the type of resource the SKU applies to. + :type resource_type: str + :param name: Gets the name of SKU. + :type name: str + :param tier: Gets the tier of SKU. + :type tier: str + :param capacity: Gets the capacity of SKU. + :type capacity: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.SkuCapacity + :param locations: Gets the set of locations that the SKU is available. + :type locations: list[str] + :param location_info: Gets a list of locations and availability zones in + those locations where the SKU is available. + :type location_info: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceSkuLocationInfo] + :param restrictions: Gets the restrictions because of which SKU cannot be + used. This is + empty if there are no restrictions. + :type restrictions: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceSkuRestrictions] + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'SkuCapacity'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__(self, *, resource_type: str=None, name: str=None, tier: str=None, capacity=None, locations=None, location_info=None, restrictions=None, **kwargs) -> None: + super(ResourceSku, self).__init__(**kwargs) + self.resource_type = resource_type + self.name = name + self.tier = tier + self.capacity = capacity + self.locations = locations + self.location_info = location_info + self.restrictions = restrictions + + +class ResourceSkuCapabilities(Model): + """ResourceSkuCapabilities. + + :param name: Gets an invariant to describe the feature. + :type name: str + :param value: Gets an invariant if the feature is measured by quantity. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ResourceSkuCapabilities, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ResourceSkuLocationInfo(Model): + """Locations and availability zones where the SKU is available. + + :param location: Gets location of the SKU + :type location: str + :param zones: Gets list of availability zones where the SKU is supported. + :type zones: list[str] + :param zone_details: Gets details of capabilities available to a SKU in + specific zones. + :type zone_details: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceSkuZoneDetails] + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'zone_details': {'key': 'zoneDetails', 'type': '[ResourceSkuZoneDetails]'}, + } + + def __init__(self, *, location: str=None, zones=None, zone_details=None, **kwargs) -> None: + super(ResourceSkuLocationInfo, self).__init__(**kwargs) + self.location = location + self.zones = zones + self.zone_details = zone_details + + +class ResourceSkuRestrictionInfo(Model): + """Information about the restriction where the SKU cannot be used. + + :param locations: Gets locations where the SKU is restricted + :type locations: list[str] + :param zones: Gets list of availability zones where the SKU is restricted. + :type zones: list[str] + """ + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, locations=None, zones=None, **kwargs) -> None: + super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) + self.locations = locations + self.zones = zones + + +class ResourceSkuRestrictions(Model): + """Restrictions where the SKU cannot be used. + + :param type: Gets the type of restrictions. Possible values include: + 'Location', 'Zone' + :type type: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceSkuRestrictionsType + :param values: Gets the value of restrictions. If the restriction type is + set to + location. This would be different locations where the SKU is restricted. + :type values: list[str] + :param restriction_info: Gets the information about the restriction where + the SKU cannot be used. + :type restriction_info: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceSkuRestrictionInfo + :param reason_code: Gets the reason for restriction. Possible values + include: 'QuotaId', 'NotAvailableForSubscription' + :type reason_code: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceSkuRestrictionsReasonCode + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__(self, *, type=None, values=None, restriction_info=None, reason_code=None, **kwargs) -> None: + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = type + self.values = values + self.restriction_info = restriction_info + self.reason_code = reason_code + + +class ResourceSkuZoneDetails(Model): + """Details of capabilities available to a SKU in specific zones. + + :param name: Gets the set of zones that the SKU is available in with the + specified capabilities. + :type name: list[str] + :param capabilities: Gets a list of capabilities that are available for + the SKU in the + specified list of zones. + :type capabilities: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceSkuCapabilities] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, + } + + def __init__(self, *, name=None, capabilities=None, **kwargs) -> None: + super(ResourceSkuZoneDetails, self).__init__(**kwargs) + self.name = name + self.capabilities = capabilities + + +class ResourceUploadDefinition(Model): + """Resource upload definition payload. + + :param relative_path: Source relative path + :type relative_path: str + :param upload_url: Upload URL + :type upload_url: str + """ + + _attribute_map = { + 'relative_path': {'key': 'relativePath', 'type': 'str'}, + 'upload_url': {'key': 'uploadUrl', 'type': 'str'}, + } + + def __init__(self, *, relative_path: str=None, upload_url: str=None, **kwargs) -> None: + super(ResourceUploadDefinition, self).__init__(**kwargs) + self.relative_path = relative_path + self.upload_url = upload_url + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The GEO location of the resource. + :type location: str + :param tags: Tags of the service which is a list of key value pairs that + describe the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class ServiceResource(TrackedResource): + """Service resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The GEO location of the resource. + :type location: str + :param tags: Tags of the service which is a list of key value pairs that + describe the resource. + :type tags: dict[str, str] + :param properties: Properties of the Service resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ClusterResourceProperties + :param sku: Sku of the Service resource + :type sku: ~azure.mgmt.appplatform.v2021_06_01_preview.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ClusterResourceProperties'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str=None, tags=None, properties=None, sku=None, **kwargs) -> None: + super(ServiceResource, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties + self.sku = sku + + +class ServiceSpecification(Model): + """Service specification payload. + + :param log_specifications: Specifications of the Log for Azure Monitoring + :type log_specifications: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.LogSpecification] + :param metric_specifications: Specifications of the Metrics for Azure + Monitoring + :type metric_specifications: + list[~azure.mgmt.appplatform.v2021_06_01_preview.models.MetricSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, *, log_specifications=None, metric_specifications=None, **kwargs) -> None: + super(ServiceSpecification, self).__init__(**kwargs) + self.log_specifications = log_specifications + self.metric_specifications = metric_specifications + + +class Sku(Model): + """Sku of Azure Spring Cloud. + + :param name: Name of the Sku. Default value: "S0" . + :type name: str + :param tier: Tier of the Sku. Default value: "Standard" . + :type tier: str + :param capacity: Current capacity of the target resource + :type capacity: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, *, name: str="S0", tier: str="Standard", capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = capacity + + +class SkuCapacity(Model): + """The SKU capacity. + + All required parameters must be populated in order to send to Azure. + + :param minimum: Required. Gets or sets the minimum. + :type minimum: int + :param maximum: Gets or sets the maximum. + :type maximum: int + :param default: Gets or sets the default. + :type default: int + :param scale_type: Gets or sets the type of the scale. Possible values + include: 'None', 'Manual', 'Automatic' + :type scale_type: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.SkuScaleType + """ + + _validation = { + 'minimum': {'required': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__(self, *, minimum: int, maximum: int=None, default: int=None, scale_type=None, **kwargs) -> None: + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = minimum + self.maximum = maximum + self.default = default + self.scale_type = scale_type + + +class SupportedRuntimeVersion(Model): + """Supported deployment runtime version descriptor. + + :param value: The raw value which could be passed to deployment CRUD + operations. Possible values include: 'Java_8', 'Java_11', 'NetCore_31' + :type value: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.SupportedRuntimeValue + :param platform: The platform of this runtime version (possible values: + "Java" or ".NET"). Possible values include: 'Java', '.NET Core' + :type platform: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.SupportedRuntimePlatform + :param version: The detailed version (major.minor) of the platform. + :type version: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'platform': {'key': 'platform', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, value=None, platform=None, version: str=None, **kwargs) -> None: + super(SupportedRuntimeVersion, self).__init__(**kwargs) + self.value = value + self.platform = platform + self.version = version + + +class TemporaryDisk(Model): + """Temporary disk payload. + + :param size_in_gb: Size of the temporary disk in GB + :type size_in_gb: int + :param mount_path: Mount path of the temporary disk + :type mount_path: str + """ + + _validation = { + 'size_in_gb': {'maximum': 5, 'minimum': 0}, + } + + _attribute_map = { + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + } + + def __init__(self, *, size_in_gb: int=None, mount_path: str=None, **kwargs) -> None: + super(TemporaryDisk, self).__init__(**kwargs) + self.size_in_gb = size_in_gb + self.mount_path = mount_path + + +class TestKeys(Model): + """Test keys payload. + + :param primary_key: Primary key + :type primary_key: str + :param secondary_key: Secondary key + :type secondary_key: str + :param primary_test_endpoint: Primary test endpoint + :type primary_test_endpoint: str + :param secondary_test_endpoint: Secondary test endpoint + :type secondary_test_endpoint: str + :param enabled: Indicates whether the test endpoint feature enabled or not + :type enabled: bool + """ + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'primary_test_endpoint': {'key': 'primaryTestEndpoint', 'type': 'str'}, + 'secondary_test_endpoint': {'key': 'secondaryTestEndpoint', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, primary_key: str=None, secondary_key: str=None, primary_test_endpoint: str=None, secondary_test_endpoint: str=None, enabled: bool=None, **kwargs) -> None: + super(TestKeys, self).__init__(**kwargs) + self.primary_key = primary_key + self.secondary_key = secondary_key + self.primary_test_endpoint = primary_test_endpoint + self.secondary_test_endpoint = secondary_test_endpoint + self.enabled = enabled + + +class UserSourceInfo(Model): + """Source information for a deployment. + + :param type: Type of the source uploaded. Possible values include: 'Jar', + 'NetCoreZip', 'Source' + :type type: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.UserSourceType + :param relative_path: Relative path of the storage which stores the source + :type relative_path: str + :param version: Version of the source + :type version: str + :param artifact_selector: Selector for the artifact to be used for the + deployment for multi-module projects. This should be + the relative path to the target module/project. + :type artifact_selector: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'relative_path': {'key': 'relativePath', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'artifact_selector': {'key': 'artifactSelector', 'type': 'str'}, + } + + def __init__(self, *, type=None, relative_path: str=None, version: str=None, artifact_selector: str=None, **kwargs) -> None: + super(UserSourceInfo, self).__init__(**kwargs) + self.type = type + self.relative_path = relative_path + self.version = version + self.artifact_selector = artifact_selector diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_paged_models.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_paged_models.py new file mode 100644 index 00000000000..a7f5e8da6ab --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/models/_paged_models.py @@ -0,0 +1,118 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ServiceResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceResource]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceResourcePaged, self).__init__(*args, **kwargs) +class AppResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`AppResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AppResource]'} + } + + def __init__(self, *args, **kwargs): + + super(AppResourcePaged, self).__init__(*args, **kwargs) +class BindingResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`BindingResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BindingResource]'} + } + + def __init__(self, *args, **kwargs): + + super(BindingResourcePaged, self).__init__(*args, **kwargs) +class CertificateResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`CertificateResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CertificateResource]'} + } + + def __init__(self, *args, **kwargs): + + super(CertificateResourcePaged, self).__init__(*args, **kwargs) +class CustomDomainResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`CustomDomainResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CustomDomainResource]'} + } + + def __init__(self, *args, **kwargs): + + super(CustomDomainResourcePaged, self).__init__(*args, **kwargs) +class DeploymentResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`DeploymentResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DeploymentResource]'} + } + + def __init__(self, *args, **kwargs): + + super(DeploymentResourcePaged, self).__init__(*args, **kwargs) +class OperationDetailPaged(Paged): + """ + A paging container for iterating over a list of :class:`OperationDetail ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OperationDetail]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationDetailPaged, self).__init__(*args, **kwargs) +class ResourceSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceSku]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceSkuPaged, self).__init__(*args, **kwargs) diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/__init__.py new file mode 100644 index 00000000000..0a24a9df9f9 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/__init__.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from ._services_operations import ServicesOperations +from ._config_servers_operations import ConfigServersOperations +from ._monitoring_settings_operations import MonitoringSettingsOperations +from ._apps_operations import AppsOperations +from ._bindings_operations import BindingsOperations +from ._certificates_operations import CertificatesOperations +from ._custom_domains_operations import CustomDomainsOperations +from ._deployments_operations import DeploymentsOperations +from ._operations import Operations +from ._runtime_versions_operations import RuntimeVersionsOperations +from ._skus_operations import SkusOperations + +__all__ = [ + 'ServicesOperations', + 'ConfigServersOperations', + 'MonitoringSettingsOperations', + 'AppsOperations', + 'BindingsOperations', + 'CertificatesOperations', + 'CustomDomainsOperations', + 'DeploymentsOperations', + 'Operations', + 'RuntimeVersionsOperations', + 'SkusOperations', +] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_agent_pools_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_apps_operations.py similarity index 64% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_agent_pools_operations.py rename to src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_apps_operations.py index 20ccc2d71f6..bf31ff9bec7 100644 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_agent_pools_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_apps_operations.py @@ -18,8 +18,8 @@ from .. import models -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. +class AppsOperations(object): + """AppsOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -27,7 +27,7 @@ class AgentPoolsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-11-01". + :ivar api_version: The API version to use for this operation. Constant value: "2021-06-01-preview". """ models = models @@ -37,121 +37,49 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-11-01" + self.api_version = "2021-06-01-preview" self.config = config - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2020_11_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. + self, resource_group_name, service_name, app_name, sync_status=None, custom_headers=None, raw=False, **operation_config): + """Get an App and its properties. - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param sync_status: Indicates whether sync status + :type sync_status: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse + :return: AppResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.appplatform.v2021_06_01_preview.models.AppResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + if sync_status is not None: + query_parameters['syncStatus'] = self._serialize.query("sync_status", sync_status, 'str') # Construct headers header_parameters = {} @@ -174,31 +102,31 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AppResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, app_name, app_resource, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -212,13 +140,13 @@ def _create_or_update_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') + body_content = self._serialize.body(app_resource, 'AppResource') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 201]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -226,9 +154,11 @@ def _create_or_update_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AppResource', response) if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AppResource', response) + if response.status_code == 202: + deserialized = self._deserialize('AppResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -237,46 +167,45 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. + self, resource_group_name, service_name, app_name, app_resource, custom_headers=None, raw=False, polling=True, **operation_config): + """Create a new App or update an exiting App. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPool + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param app_resource: Parameters for the create or update operation + :type app_resource: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.AppResource :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True + :return: An instance of LROPoller that returns AppResource or + ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_11_01.models.AgentPool] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2021_06_01_preview.models.AppResource] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_11_01.models.AgentPool]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2021_06_01_preview.models.AppResource]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, + service_name=service_name, + app_name=app_name, + app_resource=app_resource, custom_headers=custom_headers, raw=True, **operation_config ) def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('AppResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -291,24 +220,24 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, app_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -323,7 +252,7 @@ def _delete_initial( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -333,17 +262,17 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. + self, resource_group_name, service_name, app_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Operation to delete an App. - Deletes the agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -357,8 +286,8 @@ def delete( """ raw_result = self._delete_initial( resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, + service_name=service_name, + app_name=app_name, custom_headers=custom_headers, raw=True, **operation_config @@ -376,49 +305,29 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _update_initial( + self, resource_group_name, service_name, app_name, app_resource, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.get_upgrade_profile.metadata['url'] + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -426,59 +335,198 @@ def get_upgrade_profile( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct body + body_content = self._serialize.body(app_resource, 'AppResource') + # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None + if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) + deserialized = self._deserialize('AppResource', response) + if response.status_code == 202: + deserialized = self._deserialize('AppResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. + def update( + self, resource_group_name, service_name, app_name, app_resource, custom_headers=None, raw=False, polling=True, **operation_config): + """Operation to update an exiting App. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param app_resource: Parameters for the update operation + :type app_resource: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.AppResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns AppResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2021_06_01_preview.models.AppResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2021_06_01_preview.models.AppResource]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + app_resource=app_resource, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('AppResource', response) - Gets a list of supported versions for the specified agent pool. + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}'} - :param resource_group_name: The name of the resource group. + def list( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Handles requests to list all resources in a Service. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AppResource + :rtype: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.AppResourcePaged[~azure.mgmt.appplatform.v2021_06_01_preview.models.AppResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AppResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps'} + + def get_resource_upload_url( + self, resource_group_name, service_name, app_name, custom_headers=None, raw=False, **operation_config): + """Get an resource upload URL for an App, which may be artifacts or source + archive. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true + :return: ResourceUploadDefinition or ClientRawResponse if raw=true :rtype: - ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolAvailableVersions + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceUploadDefinition or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] + url = self.get_resource_upload_url.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -491,7 +539,7 @@ def get_available_agent_pool_versions( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -501,35 +549,60 @@ def get_available_agent_pool_versions( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) + deserialized = self._deserialize('ResourceUploadDefinition', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} + get_resource_upload_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/getResourceUploadUrl'} + def validate_domain( + self, resource_group_name, service_name, app_name, name, custom_headers=None, raw=False, **operation_config): + """Check the resource name is valid as well as not in use. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param name: Name to be validated + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CustomDomainValidateResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.CustomDomainValidateResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + validate_payload = models.CustomDomainValidatePayload(name=name) - def _upgrade_node_image_version_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.upgrade_node_image_version.metadata['url'] + url = self.validate_domain.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -537,74 +610,25 @@ def _upgrade_node_image_version_initial( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct body + body_content = self._serialize.body(validate_payload, 'CustomDomainValidatePayload') + # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - - if response.status_code == 202: - deserialized = self._deserialize('AgentPool', response) + if response.status_code == 200: + deserialized = self._deserialize('CustomDomainValidateResult', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - - def upgrade_node_image_version( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Upgrade node image version of an agent pool to the latest. - - Upgrade node image version of an agent pool to the latest. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_11_01.models.AgentPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_11_01.models.AgentPool]] - :raises: :class:`CloudError` - """ - raw_result = self._upgrade_node_image_version_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} + validate_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/validateDomain'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/_agent_pools_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_bindings_operations.py similarity index 57% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/_agent_pools_operations.py rename to src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_bindings_operations.py index 31502eda0fc..e174262aabf 100644 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_03_01/operations/_agent_pools_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_bindings_operations.py @@ -18,8 +18,8 @@ from .. import models -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. +class BindingsOperations(object): + """BindingsOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -27,7 +27,7 @@ class AgentPoolsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-03-01". + :ivar api_version: The API version to use for this operation. Constant value: "2021-06-01-preview". """ models = models @@ -37,105 +37,32 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-03-01" + self.api_version = "2021-06-01-preview" self.config = config - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2020_03_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. + self, resource_group_name, service_name, app_name, binding_name, custom_headers=None, raw=False, **operation_config): + """Get a Binding and its properties. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param binding_name: The name of the Binding resource. + :type binding_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_03_01.models.AgentPool or + :return: BindingResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.BindingResource or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -143,15 +70,16 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'bindingName': self._serialize.url("binding_name", binding_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -174,31 +102,34 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('BindingResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, app_name, binding_name, properties=None, custom_headers=None, raw=False, **operation_config): + binding_resource = models.BindingResource(properties=properties) + # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'bindingName': self._serialize.url("binding_name", binding_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -212,13 +143,13 @@ def _create_or_update_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') + body_content = self._serialize.body(binding_resource, 'BindingResource') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 201]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -226,9 +157,11 @@ def _create_or_update_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('BindingResource', response) if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('BindingResource', response) + if response.status_code == 202: + deserialized = self._deserialize('BindingResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -237,46 +170,48 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. + self, resource_group_name, service_name, app_name, binding_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Create a new Binding or update an exiting Binding. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPool + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param binding_name: The name of the Binding resource. + :type binding_name: str + :param properties: Properties of the Binding resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.BindingResourceProperties :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True + :return: An instance of LROPoller that returns BindingResource or + ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_03_01.models.AgentPool] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2021_06_01_preview.models.BindingResource] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_03_01.models.AgentPool]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2021_06_01_preview.models.BindingResource]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, + service_name=service_name, + app_name=app_name, + binding_name=binding_name, + properties=properties, custom_headers=custom_headers, raw=True, **operation_config ) def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('BindingResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -291,24 +226,25 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, app_name, binding_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'bindingName': self._serialize.url("binding_name", binding_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -323,7 +259,7 @@ def _delete_initial( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -333,17 +269,19 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. + self, resource_group_name, service_name, app_name, binding_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Operation to delete a Binding. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param binding_name: The name of the Binding resource. + :type binding_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -357,8 +295,9 @@ def delete( """ raw_result = self._delete_initial( resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, + service_name=service_name, + app_name=app_name, + binding_name=binding_name, custom_headers=custom_headers, raw=True, **operation_config @@ -376,49 +315,32 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. + def _update_initial( + self, resource_group_name, service_name, app_name, binding_name, properties=None, custom_headers=None, raw=False, **operation_config): + binding_resource = models.BindingResource(properties=properties) - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ # Construct URL - url = self.get_upgrade_profile.metadata['url'] + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'bindingName': self._serialize.url("binding_name", binding_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -426,86 +348,163 @@ def get_upgrade_profile( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct body + body_content = self._serialize.body(binding_resource, 'BindingResource') + # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None + if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) + deserialized = self._deserialize('BindingResource', response) + if response.status_code == 202: + deserialized = self._deserialize('BindingResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. + def update( + self, resource_group_name, service_name, app_name, binding_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Operation to update an exiting Binding. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param binding_name: The name of the Binding resource. + :type binding_name: str + :param properties: Properties of the Binding resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.BindingResourceProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns BindingResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2021_06_01_preview.models.BindingResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2021_06_01_preview.models.BindingResource]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + binding_name=binding_name, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('BindingResource', response) - Gets a list of supported versions for the specified agent pool. + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - :param resource_group_name: The name of the resource group. + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}'} + + def list( + self, resource_group_name, service_name, app_name, custom_headers=None, raw=False, **operation_config): + """Handles requests to list all resources in an App. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true + :return: An iterator like instance of BindingResource :rtype: - ~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse + ~azure.mgmt.appplatform.v2021_06_01_preview.models.BindingResourcePaged[~azure.mgmt.appplatform.v2021_06_01_preview.models.BindingResource] :raises: :class:`CloudError` """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + else: + url = next_link + query_parameters = {} - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + # Deserialize response + header_dict = None if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + header_dict = {} + deserialized = models.BindingResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/agent_pools_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_certificates_operations.py similarity index 66% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/agent_pools_operations.py rename to src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_certificates_operations.py index 84711d2c78c..bc4a01feace 100644 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/agent_pools_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_certificates_operations.py @@ -18,14 +18,16 @@ from .. import models -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. +class CertificatesOperations(object): + """CertificatesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-04-01". + :ivar api_version: The API version to use for this operation. Constant value: "2021-06-01-preview". """ models = models @@ -35,119 +37,46 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2021-06-01-preview" self.config = config - def list( - self, resource_group_name, managed_cluster_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param managed_cluster_name: The name of the managed cluster resource. - :type managed_cluster_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2019_04_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2019_04_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'managedClusterName': self._serialize.url("managed_cluster_name", managed_cluster_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools'} - def get( - self, resource_group_name, managed_cluster_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. - - Gets the details of the agent pool by managed cluster and resource - group. + self, resource_group_name, service_name, certificate_name, custom_headers=None, raw=False, **operation_config): + """Get the certificate resource. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param managed_cluster_name: The name of the managed cluster resource. - :type managed_cluster_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param certificate_name: The name of the certificate resource. + :type certificate_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse + :return: CertificateResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.CertificateResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'managedClusterName': self._serialize.url("managed_cluster_name", managed_cluster_name, 'str'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -169,33 +98,34 @@ def get( raise exp deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('CertificateResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools/{agentPoolName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}'} def _create_or_update_initial( - self, resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, certificate_name, properties=None, custom_headers=None, raw=False, **operation_config): + certificate_resource = models.CertificateResource(properties=properties) + # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'managedClusterName': self._serialize.url("managed_cluster_name", managed_cluster_name, 'str'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -209,13 +139,13 @@ def _create_or_update_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') + body_content = self._serialize.body(certificate_resource, 'CertificateResource') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 201]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -223,9 +153,11 @@ def _create_or_update_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('CertificateResource', response) if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('CertificateResource', response) + if response.status_code == 202: + deserialized = self._deserialize('CertificateResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -234,46 +166,45 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. + self, resource_group_name, service_name, certificate_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update certificate resource. - Creates or updates an agent pool in the specified managed cluster. - - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param managed_cluster_name: The name of the managed cluster resource. - :type managed_cluster_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2019_04_01.models.AgentPool + :param service_name: The name of the Service resource. + :type service_name: str + :param certificate_name: The name of the certificate resource. + :type certificate_name: str + :param properties: Properties of the certificate resource payload. + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.CertificateProperties :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True + :return: An instance of LROPoller that returns CertificateResource or + ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_04_01.models.AgentPool] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2021_06_01_preview.models.CertificateResource] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_04_01.models.AgentPool]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2021_06_01_preview.models.CertificateResource]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - managed_cluster_name=managed_cluster_name, - agent_pool_name=agent_pool_name, - parameters=parameters, + service_name=service_name, + certificate_name=certificate_name, + properties=properties, custom_headers=custom_headers, raw=True, **operation_config ) def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('CertificateResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -288,24 +219,24 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools/{agentPoolName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}'} def _delete_initial( - self, resource_group_name, managed_cluster_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, certificate_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'managedClusterName': self._serialize.url("managed_cluster_name", managed_cluster_name, 'str'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -320,7 +251,7 @@ def _delete_initial( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -330,17 +261,17 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, managed_cluster_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. + self, resource_group_name, service_name, certificate_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete the certificate resource. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param managed_cluster_name: The name of the managed cluster resource. - :type managed_cluster_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param certificate_name: The name of the certificate resource. + :type certificate_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -354,8 +285,8 @@ def delete( """ raw_result = self._delete_initial( resource_group_name=resource_group_name, - managed_cluster_name=managed_cluster_name, - agent_pool_name=agent_pool_name, + service_name=service_name, + certificate_name=certificate_name, custom_headers=custom_headers, raw=True, **operation_config @@ -373,4 +304,78 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools/{agentPoolName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}'} + + def list( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """List all the certificates of one user. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CertificateResource + :rtype: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.CertificateResourcePaged[~azure.mgmt.appplatform.v2021_06_01_preview.models.CertificateResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CertificateResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates'} diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_config_servers_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_config_servers_operations.py new file mode 100644 index 00000000000..d7d77ccf976 --- /dev/null +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_config_servers_operations.py @@ -0,0 +1,428 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ConfigServersOperations(object): + """ConfigServersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2021-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-06-01-preview" + + self.config = config + + def get( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Get the config server and its properties. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConfigServerResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerResource + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConfigServerResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default'} + + + def _update_put_initial( + self, resource_group_name, service_name, properties=None, custom_headers=None, raw=False, **operation_config): + config_server_resource = models.ConfigServerResource(properties=properties) + + # Construct URL + url = self.update_put.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(config_server_resource, 'ConfigServerResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ConfigServerResource', response) + if response.status_code == 202: + deserialized = self._deserialize('ConfigServerResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_put( + self, resource_group_name, service_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Update the config server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param properties: Properties of the Config Server resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ConfigServerResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerResource]] + :raises: :class:`CloudError` + """ + raw_result = self._update_put_initial( + resource_group_name=resource_group_name, + service_name=service_name, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ConfigServerResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default'} + + + def _update_patch_initial( + self, resource_group_name, service_name, properties=None, custom_headers=None, raw=False, **operation_config): + config_server_resource = models.ConfigServerResource(properties=properties) + + # Construct URL + url = self.update_patch.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(config_server_resource, 'ConfigServerResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ConfigServerResource', response) + if response.status_code == 202: + deserialized = self._deserialize('ConfigServerResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_patch( + self, resource_group_name, service_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Update the config server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param properties: Properties of the Config Server resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ConfigServerResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerResource]] + :raises: :class:`CloudError` + """ + raw_result = self._update_patch_initial( + resource_group_name=resource_group_name, + service_name=service_name, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ConfigServerResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default'} + + + def _validate_initial( + self, resource_group_name, service_name, git_property=None, custom_headers=None, raw=False, **operation_config): + config_server_settings = models.ConfigServerSettings(git_property=git_property) + + # Construct URL + url = self.validate.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(config_server_settings, 'ConfigServerSettings') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ConfigServerSettingsValidateResult', response) + if response.status_code == 202: + deserialized = self._deserialize('ConfigServerSettingsValidateResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def validate( + self, resource_group_name, service_name, git_property=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Check if the config server settings are valid. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param git_property: Property of git environment. + :type git_property: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerGitProperty + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ConfigServerSettingsValidateResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerSettingsValidateResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2021_06_01_preview.models.ConfigServerSettingsValidateResult]] + :raises: :class:`CloudError` + """ + raw_result = self._validate_initial( + resource_group_name=resource_group_name, + service_name=service_name, + git_property=git_property, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ConfigServerSettingsValidateResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/validate'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/_agent_pools_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_custom_domains_operations.py similarity index 57% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/_agent_pools_operations.py rename to src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_custom_domains_operations.py index 71b48ccc96d..ea9c40362bf 100644 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_02_01/operations/_agent_pools_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_custom_domains_operations.py @@ -18,8 +18,8 @@ from .. import models -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. +class CustomDomainsOperations(object): + """CustomDomainsOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -27,7 +27,7 @@ class AgentPoolsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-02-01". + :ivar api_version: The API version to use for this operation. Constant value: "2021-06-01-preview". """ models = models @@ -37,121 +37,49 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-02-01" + self.api_version = "2021-06-01-preview" self.config = config - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2020_02_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} - def get( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. + self, resource_group_name, service_name, app_name, domain_name, custom_headers=None, raw=False, **operation_config): + """Get the custom domain of one lifecycle application. - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param domain_name: The name of the custom domain resource. + :type domain_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2020_02_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse + :return: CustomDomainResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.CustomDomainResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -174,31 +102,34 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('CustomDomainResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} def _create_or_update_initial( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, app_name, domain_name, properties=None, custom_headers=None, raw=False, **operation_config): + domain_resource = models.CustomDomainResource(properties=properties) + # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -212,13 +143,13 @@ def _create_or_update_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') + body_content = self._serialize.body(domain_resource, 'CustomDomainResource') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 201]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -226,9 +157,11 @@ def _create_or_update_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('CustomDomainResource', response) if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('CustomDomainResource', response) + if response.status_code == 202: + deserialized = self._deserialize('CustomDomainResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -237,46 +170,48 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, resource_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. + self, resource_group_name, service_name, app_name, domain_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update custom domain of one lifecycle application. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPool + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param domain_name: The name of the custom domain resource. + :type domain_name: str + :param properties: Properties of the custom domain resource. + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.CustomDomainProperties :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True + :return: An instance of LROPoller that returns CustomDomainResource or + ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2020_02_01.models.AgentPool] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2021_06_01_preview.models.CustomDomainResource] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2020_02_01.models.AgentPool]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2021_06_01_preview.models.CustomDomainResource]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - parameters=parameters, + service_name=service_name, + app_name=app_name, + domain_name=domain_name, + properties=properties, custom_headers=custom_headers, raw=True, **operation_config ) def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('CustomDomainResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -291,24 +226,25 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} def _delete_initial( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, service_name, app_name, domain_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -323,7 +259,7 @@ def _delete_initial( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -333,17 +269,19 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. - - Deletes the agent pool in the specified managed cluster. + self, resource_group_name, service_name, app_name, domain_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete the custom domain of one lifecycle application. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param domain_name: The name of the custom domain resource. + :type domain_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -357,8 +295,9 @@ def delete( """ raw_result = self._delete_initial( resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, + service_name=service_name, + app_name=app_name, + domain_name=domain_name, custom_headers=custom_headers, raw=True, **operation_config @@ -376,49 +315,32 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} - def get_upgrade_profile( - self, resource_group_name, resource_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for an agent pool. - Gets the details of the upgrade profile for an agent pool with a - specified resource group and managed cluster name. + def _update_initial( + self, resource_group_name, service_name, app_name, domain_name, properties=None, custom_headers=None, raw=False, **operation_config): + domain_resource = models.CustomDomainResource(properties=properties) - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AgentPoolUpgradeProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolUpgradeProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ # Construct URL - url = self.get_upgrade_profile.metadata['url'] + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -426,86 +348,163 @@ def get_upgrade_profile( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct body + body_content = self._serialize.body(domain_resource, 'CustomDomainResource') + # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None + if response.status_code == 200: - deserialized = self._deserialize('AgentPoolUpgradeProfile', response) + deserialized = self._deserialize('CustomDomainResource', response) + if response.status_code == 202: + deserialized = self._deserialize('CustomDomainResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} - def get_available_agent_pool_versions( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of supported versions for the specified agent pool. + def update( + self, resource_group_name, service_name, app_name, domain_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Update custom domain of one lifecycle application. - Gets a list of supported versions for the specified agent pool. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param domain_name: The name of the custom domain resource. + :type domain_name: str + :param properties: Properties of the custom domain resource. + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.CustomDomainProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns CustomDomainResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2021_06_01_preview.models.CustomDomainResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2021_06_01_preview.models.CustomDomainResource]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + domain_name=domain_name, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('CustomDomainResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}'} + + def list( + self, resource_group_name, service_name, app_name, custom_headers=None, raw=False, **operation_config): + """List the custom domains of one lifecycle application. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: AgentPoolAvailableVersions or ClientRawResponse if raw=true + :return: An iterator like instance of CustomDomainResource :rtype: - ~azure.mgmt.containerservice.v2020_02_01.models.AgentPoolAvailableVersions - or ~msrest.pipeline.ClientRawResponse + ~azure.mgmt.appplatform.v2021_06_01_preview.models.CustomDomainResourcePaged[~azure.mgmt.appplatform.v2021_06_01_preview.models.CustomDomainResource] :raises: :class:`CloudError` """ - # Construct URL - url = self.get_available_agent_pool_versions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + else: + url = next_link + query_parameters = {} - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPoolAvailableVersions', response) + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + # Deserialize response + header_dict = None if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + header_dict = {} + deserialized = models.CustomDomainResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/managed_clusters_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_deployments_operations.py similarity index 57% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/managed_clusters_operations.py rename to src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_deployments_operations.py index 75a89237883..1ff5f294302 100644 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/operations/managed_clusters_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_deployments_operations.py @@ -18,14 +18,16 @@ from .. import models -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. +class DeploymentsOperations(object): + """DeploymentsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-04-01". + :ivar api_version: The API version to use for this operation. Constant value: "2021-06-01-preview". """ models = models @@ -35,182 +37,49 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01" + self.api_version = "2021-06-01-preview" self.config = config - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. - - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterPaged[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. + def get( + self, resource_group_name, service_name, app_name, deployment_name, custom_headers=None, raw=False, **operation_config): + """Get a Deployment and its properties. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true + :return: DeploymentResource or ClientRawResponse if raw=true :rtype: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterUpgradeProfile + ~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentResource or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = self.get_upgrade_profile.metadata['url'] + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -232,59 +101,40 @@ def get_upgrade_profile( raise exp deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) + deserialized = self._deserialize('DeploymentResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. + def _create_or_update_initial( + self, resource_group_name, service_name, app_name, deployment_name, properties=None, sku=None, custom_headers=None, raw=False, **operation_config): + deployment_resource = models.DeploymentResource(properties=properties, sku=sku) - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAccessProfile - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ # Construct URL - url = self.get_access_profile.metadata['url'] + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'roleName': self._serialize.url("role_name", role_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -292,11 +142,14 @@ def get_access_profile( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct body + body_content = self._serialize.body(deployment_resource, 'DeploymentResource') + # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -304,119 +157,100 @@ def get_access_profile( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) + deserialized = self._deserialize('DeploymentResource', response) + if response.status_code == 201: + deserialized = self._deserialize('DeploymentResource', response) + if response.status_code == 202: + deserialized = self._deserialize('DeploymentResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster admin credential of a managed cluster. - - Gets cluster admin credential of the managed cluster with a specified - resource group and name. + def create_or_update( + self, resource_group_name, service_name, app_name, deployment_name, properties=None, sku=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Create a new Deployment or update an exiting Deployment. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :param properties: Properties of the Deployment resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentResourceProperties + :param sku: Sku of the Deployment resource + :type sku: ~azure.mgmt.appplatform.v2021_06_01_preview.models.Sku :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns DeploymentResource or + ClientRawResponse if raw==True :rtype: - ~azure.mgmt.containerservice.v2019_04_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentResource]] :raises: :class:`CloudError` """ - # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, + properties=properties, + sku=sku, + custom_headers=custom_headers, + raw=True, + **operation_config + ) - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) + def get_long_running_output(response): + deserialized = self._deserialize('DeploymentResource', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} + return deserialized - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credential of a managed cluster. + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} - Gets cluster user credential of the managed cluster with a specified - resource group and name. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.v2019_04_01.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _delete_initial( + self, resource_group_name, service_name, app_name, deployment_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -425,106 +259,86 @@ def list_cluster_user_credentials( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. + def delete( + self, resource_group_name, service_name, app_name, deployment_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Operation to delete a Deployment. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster - or ~msrest.pipeline.ClientRawResponse + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} + def _update_initial( + self, resource_group_name, service_name, app_name, deployment_name, properties=None, sku=None, custom_headers=None, raw=False, **operation_config): + deployment_resource = models.DeploymentResource(properties=properties, sku=sku) - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.create_or_update.metadata['url'] + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -538,13 +352,13 @@ def _create_or_update_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') + body_content = self._serialize.body(deployment_resource, 'DeploymentResource') # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) + request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -552,9 +366,9 @@ def _create_or_update_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('DeploymentResource', response) + if response.status_code == 202: + deserialized = self._deserialize('DeploymentResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -562,45 +376,52 @@ def _create_or_update_initial( return deserialized - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. + def update( + self, resource_group_name, service_name, app_name, deployment_name, properties=None, sku=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Operation to update an exiting Deployment. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :param properties: Properties of the Deployment resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentResourceProperties + :param sku: Sku of the Deployment resource + :type sku: ~azure.mgmt.appplatform.v2021_06_01_preview.models.Sku :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True + :return: An instance of LROPoller that returns DeploymentResource or + ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentResource] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentResource]] :raises: :class:`CloudError` """ - raw_result = self._create_or_update_initial( + raw_result = self._update_initial( resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, + properties=properties, + sku=sku, custom_headers=custom_headers, raw=True, **operation_config ) def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('DeploymentResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -615,127 +436,184 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}'} + def list( + self, resource_group_name, service_name, app_name, version=None, custom_headers=None, raw=False, **operation_config): + """Handles requests to list all resources in an App. - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param version: Version of the deployments to be listed + :type version: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DeploymentResource + :rtype: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentResourcePaged[~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + if version is not None: + query_parameters['version'] = self._serialize.query("version", version, '[str]', div=',') - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + else: + url = next_link + query_parameters = {} - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + def internal_paging(next_link=None): + request = prepare_request(next_link) - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + response = self._client.send(request, stream=False, **operation_config) - deserialized = None + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) + return response + # Deserialize response + header_dict = None if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + header_dict = {} + deserialized = models.DeploymentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments'} - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. + def list_for_cluster( + self, resource_group_name, service_name, version=None, custom_headers=None, raw=False, **operation_config): + """List deployments for a certain service. - Updates a managed cluster with the specified tags. - - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] + :param service_name: The name of the Service resource. + :type service_name: str + :param version: Version of the deployments to be listed + :type version: list[str] :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DeploymentResource :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_04_01.models.ManagedCluster]] + ~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentResourcePaged[~azure.mgmt.appplatform.v2021_06_01_preview.models.DeploymentResource] :raises: :class:`CloudError` """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_for_cluster.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + if version is not None: + query_parameters['version'] = self._serialize.query("version", version, '[str]', div=',') - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + else: + url = next_link + query_parameters = {} - return deserialized + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + def internal_paging(next_link=None): + request = prepare_request(next_link) - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DeploymentResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_for_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/deployments'} + + + def _start_initial( + self, resource_group_name, service_name, app_name, deployment_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.delete.metadata['url'] + url = self.start.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -747,10 +625,10 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -759,16 +637,20 @@ def _delete_initial( client_raw_response = ClientRawResponse(None, response) return client_raw_response - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. - - Deletes the managed cluster with a specified resource group and name. + def start( + self, resource_group_name, service_name, app_name, deployment_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Start the deployment. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -780,9 +662,11 @@ def delete( ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ - raw_result = self._delete_initial( + raw_result = self._start_initial( resource_group_name=resource_group_name, - resource_name=resource_name, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, custom_headers=custom_headers, raw=True, **operation_config @@ -796,33 +680,32 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/start'} - def _reset_service_principal_profile_initial( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ManagedClusterServicePrincipalProfile(client_id=client_id, secret=secret) - + def _stop_initial( + self, resource_group_name, service_name, app_name, deployment_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.reset_service_principal_profile.metadata['url'] + url = self.stop.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -830,11 +713,8 @@ def _reset_service_principal_profile_initial( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) + request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: @@ -846,21 +726,20 @@ def _reset_service_principal_profile_initial( client_raw_response = ClientRawResponse(None, response) return client_raw_response - def reset_service_principal_profile( - self, resource_group_name, resource_name, client_id, secret=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset Service Principal Profile of a managed cluster. - - Update the service principal Profile for a managed cluster. + def stop( + self, resource_group_name, service_name, app_name, deployment_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Stop the deployment. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param client_id: The ID for the service principal. - :type client_id: str - :param secret: The secret password associated with the service - principal in plain text. - :type secret: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -872,11 +751,11 @@ def reset_service_principal_profile( ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ - raw_result = self._reset_service_principal_profile_initial( + raw_result = self._stop_initial( resource_group_name=resource_group_name, - resource_name=resource_name, - client_id=client_id, - secret=secret, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, custom_headers=custom_headers, raw=True, **operation_config @@ -890,31 +769,32 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/stop'} - def _reset_aad_profile_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): + def _restart_initial( + self, resource_group_name, service_name, app_name, deployment_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.reset_aad_profile.metadata['url'] + url = self.restart.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -922,11 +802,8 @@ def _reset_aad_profile_initial( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) + request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: @@ -938,20 +815,20 @@ def _reset_aad_profile_initial( client_raw_response = ClientRawResponse(None, response) return client_raw_response - def reset_aad_profile( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Reset AAD Profile of a managed cluster. - - Update the AAD Profile for a managed cluster. + def restart( + self, resource_group_name, service_name, app_name, deployment_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Restart the deployment. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Reset AAD Profile - operation for a Managed Cluster. - :type parameters: - ~azure.mgmt.containerservice.v2019_04_01.models.ManagedClusterAADProfile + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -963,10 +840,11 @@ def reset_aad_profile( ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ - raw_result = self._reset_aad_profile_initial( + raw_result = self._restart_initial( resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, + service_name=service_name, + app_name=app_name, + deployment_name=deployment_name, custom_headers=custom_headers, raw=True, **operation_config @@ -980,8 +858,78 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/restart'} + + def get_log_file_url( + self, resource_group_name, service_name, app_name, deployment_name, custom_headers=None, raw=False, **operation_config): + """Get deployment log file URL. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param app_name: The name of the App resource. + :type app_name: str + :param deployment_name: The name of the Deployment resource. + :type deployment_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LogFileUrlResponse or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.LogFileUrlResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_log_file_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'appName': self._serialize.url("app_name", app_name, 'str'), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('LogFileUrlResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_log_file_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/getLogFileUrl'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/agent_pools_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_monitoring_settings_operations.py similarity index 50% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/agent_pools_operations.py rename to src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_monitoring_settings_operations.py index 6fd94184fc3..0bf89fa82af 100644 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_02_01/operations/agent_pools_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_monitoring_settings_operations.py @@ -18,14 +18,16 @@ from .. import models -class AgentPoolsOperations(object): - """AgentPoolsOperations operations. +class MonitoringSettingsOperations(object): + """MonitoringSettingsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-02-01". + :ivar api_version: The API version to use for this operation. Constant value: "2021-06-01-preview". """ models = models @@ -35,119 +37,43 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-02-01" + self.api_version = "2021-06-01-preview" self.config = config - def list( - self, resource_group_name, managed_cluster_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of agent pools in the specified managed cluster. - - Gets a list of agent pools in the specified managed cluster. The - operation returns properties of each agent pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param managed_cluster_name: The name of the managed cluster resource. - :type managed_cluster_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AgentPool - :rtype: - ~azure.mgmt.containerservice.v2019_02_01.models.AgentPoolPaged[~azure.mgmt.containerservice.v2019_02_01.models.AgentPool] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'managedClusterName': self._serialize.url("managed_cluster_name", managed_cluster_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AgentPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools'} - def get( - self, resource_group_name, managed_cluster_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets the agent pool. + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Get the Monitoring Setting and its properties. - Gets the details of the agent pool by managed cluster and resource - group. - - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param managed_cluster_name: The name of the managed cluster resource. - :type managed_cluster_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str + :param service_name: The name of the Service resource. + :type service_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: AgentPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.v2019_02_01.models.AgentPool or - ~msrest.pipeline.ClientRawResponse + :return: MonitoringSettingResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.MonitoringSettingResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'managedClusterName': self._serialize.url("managed_cluster_name", managed_cluster_name, 'str'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -169,33 +95,33 @@ def get( raise exp deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('MonitoringSettingResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools/{agentPoolName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default'} + + def _update_put_initial( + self, resource_group_name, service_name, properties=None, custom_headers=None, raw=False, **operation_config): + monitoring_setting_resource = models.MonitoringSettingResource(properties=properties) - def _create_or_update_initial( - self, resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.create_or_update.metadata['url'] + url = self.update_put.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'managedClusterName': self._serialize.url("managed_cluster_name", managed_cluster_name, 'str'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -209,13 +135,13 @@ def _create_or_update_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'AgentPool') + body_content = self._serialize.body(monitoring_setting_resource, 'MonitoringSettingResource') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -223,9 +149,9 @@ def _create_or_update_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AgentPool', response) - if response.status_code == 201: - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('MonitoringSettingResource', response) + if response.status_code == 202: + deserialized = self._deserialize('MonitoringSettingResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -233,47 +159,44 @@ def _create_or_update_initial( return deserialized - def create_or_update( - self, resource_group_name, managed_cluster_name, agent_pool_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an agent pool. - - Creates or updates an agent pool in the specified managed cluster. + def update_put( + self, resource_group_name, service_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Update the Monitoring Setting. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param managed_cluster_name: The name of the managed cluster resource. - :type managed_cluster_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str - :param parameters: Parameters supplied to the Create or Update an - agent pool operation. - :type parameters: - ~azure.mgmt.containerservice.v2019_02_01.models.AgentPool + :param service_name: The name of the Service resource. + :type service_name: str + :param properties: Properties of the Monitoring Setting resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.MonitoringSettingProperties :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns AgentPool or - ClientRawResponse if raw==True + :return: An instance of LROPoller that returns + MonitoringSettingResource or + ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.v2019_02_01.models.AgentPool] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2021_06_01_preview.models.MonitoringSettingResource] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.v2019_02_01.models.AgentPool]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2021_06_01_preview.models.MonitoringSettingResource]] :raises: :class:`CloudError` """ - raw_result = self._create_or_update_initial( + raw_result = self._update_put_initial( resource_group_name=resource_group_name, - managed_cluster_name=managed_cluster_name, - agent_pool_name=agent_pool_name, - parameters=parameters, + service_name=service_name, + properties=properties, custom_headers=custom_headers, raw=True, **operation_config ) def get_long_running_output(response): - deserialized = self._deserialize('AgentPool', response) + deserialized = self._deserialize('MonitoringSettingResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -288,27 +211,30 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools/{agentPoolName}'} + update_put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default'} - def _delete_initial( - self, resource_group_name, managed_cluster_name, agent_pool_name, custom_headers=None, raw=False, **operation_config): + def _update_patch_initial( + self, resource_group_name, service_name, properties=None, custom_headers=None, raw=False, **operation_config): + monitoring_setting_resource = models.MonitoringSettingResource(properties=properties) + # Construct URL - url = self.delete.metadata['url'] + url = self.update_patch.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'managedClusterName': self._serialize.url("managed_cluster_name", managed_cluster_name, 'str'), - 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -316,56 +242,76 @@ def _delete_initial( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct body + body_content = self._serialize.body(monitoring_setting_resource, 'MonitoringSettingResource') + # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) + request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('MonitoringSettingResource', response) + if response.status_code == 202: + deserialized = self._deserialize('MonitoringSettingResource', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - def delete( - self, resource_group_name, managed_cluster_name, agent_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an agent pool. + return deserialized - Deletes the agent pool in the specified managed cluster. + def update_patch( + self, resource_group_name, service_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Update the Monitoring Setting. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param managed_cluster_name: The name of the managed cluster resource. - :type managed_cluster_name: str - :param agent_pool_name: The name of the agent pool. - :type agent_pool_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param properties: Properties of the Monitoring Setting resource + :type properties: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.MonitoringSettingProperties :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :return: An instance of LROPoller that returns + MonitoringSettingResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2021_06_01_preview.models.MonitoringSettingResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2021_06_01_preview.models.MonitoringSettingResource]] :raises: :class:`CloudError` """ - raw_result = self._delete_initial( + raw_result = self._update_patch_initial( resource_group_name=resource_group_name, - managed_cluster_name=managed_cluster_name, - agent_pool_name=agent_pool_name, + service_name=service_name, + properties=properties, custom_headers=custom_headers, raw=True, **operation_config ) def get_long_running_output(response): + deserialized = self._deserialize('MonitoringSettingResource', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response + return deserialized + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -373,4 +319,4 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{managedClusterName}/agentPools/{agentPoolName}'} + update_patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_operations.py similarity index 82% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/_operations.py rename to src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_operations.py index b1c5b037dc2..d4951ff128c 100644 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_08_01/operations/_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_operations.py @@ -25,7 +25,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-08-01". + :ivar api_version: The API version to use for this operation. Constant value: "2021-06-01-preview". """ models = models @@ -35,22 +35,23 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-08-01" + self.api_version = "2021-06-01-preview" self.config = config def list( self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. + """Lists all of the available REST API operations of the + Microsoft.AppPlatform provider. :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of OperationValue + :return: An iterator like instance of OperationDetail :rtype: - ~azure.mgmt.containerservice.v2019_08_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2019_08_01.models.OperationValue] + ~azure.mgmt.appplatform.v2021_06_01_preview.models.OperationDetailPaged[~azure.mgmt.appplatform.v2021_06_01_preview.models.OperationDetail] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -60,7 +61,7 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -96,7 +97,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.OperationDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} + list.metadata = {'url': '/providers/Microsoft.AppPlatform/operations'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_private_link_resources_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_runtime_versions_operations.py similarity index 61% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_private_link_resources_operations.py rename to src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_runtime_versions_operations.py index 902fc5cfb0a..ff859f927be 100644 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_09_01/operations/_private_link_resources_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_runtime_versions_operations.py @@ -16,8 +16,8 @@ from .. import models -class PrivateLinkResourcesOperations(object): - """PrivateLinkResourcesOperations operations. +class RuntimeVersionsOperations(object): + """RuntimeVersionsOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -25,7 +25,7 @@ class PrivateLinkResourcesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-09-01". + :ivar api_version: The API version to use for this operation. Constant value: "2021-06-01-preview". """ models = models @@ -35,45 +35,32 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-09-01" + self.api_version = "2021-06-01-preview" self.config = config - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of private link resources in the specified managed cluster. + def list_runtime_versions( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available runtime versions supported by + Microsoft.AppPlatform provider. - Gets a list of private link resources in the specified managed cluster. - The operation returns properties of each private link resource. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: PrivateLinkResourcesListResult or ClientRawResponse if - raw=true + :return: AvailableRuntimeVersions or ClientRawResponse if raw=true :rtype: - ~azure.mgmt.containerservice.v2020_09_01.models.PrivateLinkResourcesListResult + ~azure.mgmt.appplatform.v2021_06_01_preview.models.AvailableRuntimeVersions or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$') - } - url = self._client.format_url(url, **path_format_arguments) + url = self.list_runtime_versions.metadata['url'] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -96,11 +83,11 @@ def list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PrivateLinkResourcesListResult', response) + deserialized = self._deserialize('AvailableRuntimeVersions', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} + list_runtime_versions.metadata = {'url': '/providers/Microsoft.AppPlatform/runtimeVersions'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/managed_clusters_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_services_operations.py similarity index 64% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/managed_clusters_operations.py rename to src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_services_operations.py index ee38a71b40e..8372978d908 100644 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_aks/operations/managed_clusters_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_services_operations.py @@ -18,14 +18,16 @@ from .. import models -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. +class ServicesOperations(object): + """ServicesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-03-31". + :ivar api_version: The API version to use for this operation. Constant value: "2021-06-01-preview". """ models = models @@ -35,186 +37,199 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-03-31" + self.api_version = "2021-06-01-preview" self.config = config - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of managed clusters in the specified subscription. - - Gets a list of managed clusters in the specified subscription. The - operation returns properties of each managed cluster. + def get( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Get a Service and its properties. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of ManagedCluster + :return: ServiceResource or ClientRawResponse if raw=true :rtype: - ~azure.mgmt.containerservice.models.ManagedClusterPaged[~azure.mgmt.containerservice.models.ManagedCluster] + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ServiceResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - return response + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - # Deserialize response - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServiceResource', response) if raw: - header_dict = {} - client_raw_response = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists managed clusters in the specified subscription and resource - group. + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}'} - Lists managed clusters in the specified subscription and resource - group. The operation returns properties of each managed cluster. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.containerservice.models.ManagedClusterPaged[~azure.mgmt.containerservice.models.ManagedCluster] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) + def _create_or_update_initial( + self, resource_group_name, service_name, resource, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - else: - url = next_link - query_parameters = {} + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct body + body_content = self._serialize.body(resource, 'ServiceResource') - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - return response + deserialized = None - # Deserialize response - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies) + if response.status_code == 200: + deserialized = self._deserialize('ServiceResource', response) + if response.status_code == 201: + deserialized = self._deserialize('ServiceResource', response) + if response.status_code == 202: + deserialized = self._deserialize('ServiceResource', response) if raw: - header_dict = {} - client_raw_response = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} - - def get_upgrade_profile( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets upgrade profile for a managed cluster. - Gets the details of the upgrade profile for a managed cluster with a - specified resource group and name. + def create_or_update( + self, resource_group_name, service_name, resource, custom_headers=None, raw=False, polling=True, **operation_config): + """Create a new Service or update an exiting Service. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param resource: Parameters for the create or update operation + :type resource: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ServiceResource :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterUpgradeProfile or ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ServiceResource or + ClientRawResponse if raw==True :rtype: - ~azure.mgmt.containerservice.models.ManagedClusterUpgradeProfile or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2021_06_01_preview.models.ServiceResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2021_06_01_preview.models.ServiceResource]] :raises: :class:`CloudError` """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + resource=resource, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}'} + + + def _delete_initial( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.get_upgrade_profile.metadata['url'] + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + 'serviceName': self._serialize.url("service_name", service_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -223,68 +238,81 @@ def get_upgrade_profile( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterUpgradeProfile', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. + def delete( + self, resource_group_name, service_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Operation to delete a Service. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str + :param service_name: The name of the Service resource. + :type service_name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.models.ManagedClusterAccessProfile or - ~msrest.pipeline.ClientRawResponse + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}'} + + + def _update_initial( + self, resource_group_name, service_name, resource, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.get_access_profile.metadata['url'] + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'roleName': self._serialize.url("role_name", role_name, 'str') + 'serviceName': self._serialize.url("service_name", service_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -292,11 +320,14 @@ def get_access_profile( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct body + body_content = self._serialize.body(resource, 'ServiceResource') + # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -304,48 +335,101 @@ def get_access_profile( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) + deserialized = self._deserialize('ServiceResource', response) + if response.status_code == 202: + deserialized = self._deserialize('ServiceResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - def list_cluster_admin_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets clusteradmin credential of a managed cluster. + def update( + self, resource_group_name, service_name, resource, custom_headers=None, raw=False, polling=True, **operation_config): + """Operation to update an exiting Service. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param resource: Parameters for the update operation + :type resource: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ServiceResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ServiceResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2021_06_01_preview.models.ServiceResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2021_06_01_preview.models.ServiceResource]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + resource=resource, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}'} - Gets clusteradmin credential of the managed cluster with a specified - resource group and name. + def list_test_keys( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """List test keys for a Service. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str + :param service_name: The name of the Service resource. + :type service_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.models.CredentialResults or + :return: TestKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.appplatform.v2021_06_01_preview.models.TestKeys or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = self.list_cluster_admin_credentials.metadata['url'] + url = self.list_test_keys.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + 'serviceName': self._serialize.url("service_name", service_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -367,54 +451,59 @@ def list_cluster_admin_credentials( raise exp deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) + deserialized = self._deserialize('TestKeys', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} - - def list_cluster_user_credentials( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets clusteruser credential of a managed cluster. + list_test_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/listTestKeys'} - Gets clusteruser credential of the managed cluster with a specified - resource group and name. + def regenerate_test_key( + self, resource_group_name, service_name, key_type, custom_headers=None, raw=False, **operation_config): + """Regenerate a test key for a Service. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param key_type: Type of the test key. Possible values include: + 'Primary', 'Secondary' + :type key_type: str or + ~azure.mgmt.appplatform.v2021_06_01_preview.models.TestKeyType :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: CredentialResults or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.models.CredentialResults or + :return: TestKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.appplatform.v2021_06_01_preview.models.TestKeys or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + regenerate_test_key_request = models.RegenerateTestKeyRequestPayload(key_type=key_type) + # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] + url = self.regenerate_test_key.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + 'serviceName': self._serialize.url("service_name", service_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -422,8 +511,11 @@ def list_cluster_user_credentials( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct body + body_content = self._serialize.body(regenerate_test_key_request, 'RegenerateTestKeyRequestPayload') + # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -432,54 +524,50 @@ def list_cluster_user_credentials( raise exp deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) + deserialized = self._deserialize('TestKeys', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} + regenerate_test_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/regenerateTestKey'} - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a managed cluster. - - Gets the details of the managed cluster with a specified resource group - and name. + def disable_test_endpoint( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Disable test endpoint functionality for a Service. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str + :param service_name: The name of the Service resource. + :type service_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.containerservice.models.ManagedCluster or - ~msrest.pipeline.ClientRawResponse + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = self.get.metadata['url'] + url = self.disable_test_endpoint.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + 'serviceName': self._serialize.url("service_name", service_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -488,7 +576,7 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -496,38 +584,47 @@ def get( exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response + disable_test_endpoint.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/disableTestEndpoint'} - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - + def enable_test_endpoint( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Enable test endpoint functionality for a Service. - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TestKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.appplatform.v2021_06_01_preview.models.TestKeys or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ # Construct URL - url = self.create_or_update.metadata['url'] + url = self.enable_test_endpoint.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + 'serviceName': self._serialize.url("service_name", service_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -535,102 +632,60 @@ def _create_or_update_initial( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) + request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 201]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('TestKeys', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a managed cluster. - - Creates or updates a managed cluster with the specified configuration - for agents and Kubernetes version. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param parameters: Parameters supplied to the Create or Update a - Managed Cluster operation. - :type parameters: ~azure.mgmt.containerservice.models.ManagedCluster + enable_test_endpoint.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/enableTestEndpoint'} + + def check_name_availability( + self, location, type, name, custom_headers=None, raw=False, **operation_config): + """Checks that the resource name is valid and is not already in use. + + :param location: the region + :type location: str + :param type: Type of the resource to check name availability + :type type: str + :param name: Name to be checked + :type name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NameAvailability or ClientRawResponse if raw=true :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.models.ManagedCluster]] + ~azure.mgmt.appplatform.v2021_06_01_preview.models.NameAvailability or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} - - - def _update_tags_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.TagsObject(tags=tags) + availability_parameters = models.NameAvailabilityParameters(type=type, name=name) # Construct URL - url = self.update_tags.metadata['url'] + url = self.check_name_availability.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + 'location': self._serialize.url("location", location, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -644,10 +699,10 @@ def _update_tags_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'TagsObject') + body_content = self._serialize.body(availability_parameters, 'NameAvailabilityParameters') # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) + request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -656,145 +711,149 @@ def _update_tags_initial( raise exp deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) + deserialized = self._deserialize('NameAvailability', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/locations/{location}/checkNameAvailability'} - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates tags on a managed cluster. - - Updates a managed cluster with the specified tags. + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Handles requests to list all resources in a subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param tags: Resource tags. - :type tags: dict[str, str] :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServiceResource :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.models.ManagedCluster]] + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ServiceResourcePaged[~azure.mgmt.appplatform.v2021_06_01_preview.models.ServiceResource] :raises: :class:`CloudError` """ - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) - return deserialized + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} + else: + url = next_link + query_parameters = {} + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + def internal_paging(next_link=None): + request = prepare_request(next_link) - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + response = self._client.send(request, stream=False, **operation_config) - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + return response + # Deserialize response + header_dict = None if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + header_dict = {} + deserialized = models.ServiceResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed cluster. + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/Spring'} - Deletes the managed cluster with a specified resource group and name. + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Handles requests to list all resources in a resource group. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServiceResource + :rtype: + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ServiceResourcePaged[~azure.mgmt.appplatform.v2021_06_01_preview.models.ServiceResource] :raises: :class:`CloudError` """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ServiceResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_skus_operations.py similarity index 76% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/_operations.py rename to src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_skus_operations.py index b24ee7de294..43af9938c8b 100644 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_10_01/operations/_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/operations/_skus_operations.py @@ -16,8 +16,8 @@ from .. import models -class Operations(object): - """Operations operations. +class SkusOperations(object): + """SkusOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -25,7 +25,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-10-01". + :ivar api_version: The API version to use for this operation. Constant value: "2021-06-01-preview". """ models = models @@ -35,32 +35,36 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-10-01" + self.api_version = "2021-06-01-preview" self.config = config def list( self, custom_headers=None, raw=False, **operation_config): - """Gets a list of compute operations. + """Lists all of the available skus of the Microsoft.AppPlatform provider. :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of OperationValue + :return: An iterator like instance of ResourceSku :rtype: - ~azure.mgmt.containerservice.v2019_10_01.models.OperationValuePaged[~azure.mgmt.containerservice.v2019_10_01.models.OperationValue] + ~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceSkuPaged[~azure.mgmt.appplatform.v2021_06_01_preview.models.ResourceSku] :raises: :class:`CloudError` """ def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -96,7 +100,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.OperationValuePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.ResourceSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/skus'} diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/version.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/version.py similarity index 93% rename from src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/version.py rename to src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/version.py index 391827c689e..a0ac0f4d505 100644 --- a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2018_08_01_preview/version.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2021_06_01_preview/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2018-08-01-preview" +VERSION = "2021-06-01-preview" diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/version.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/version.py index a39916c162c..9c644827672 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/version.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.2.0" diff --git a/src/spring-cloud/setup.py b/src/spring-cloud/setup.py index f503c7a5a88..bec7367dc21 100644 --- a/src/spring-cloud/setup.py +++ b/src/spring-cloud/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '2.5.1' +VERSION = '2.6.0' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers diff --git a/src/vmware/CHANGELOG.md b/src/vmware/CHANGELOG.md index afacacd5707..2dde8b3e47f 100644 --- a/src/vmware/CHANGELOG.md +++ b/src/vmware/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 3.0.0 (2021-06) +## 3.0.0 (2021-07) - [BREAKING CHANGE] `az vmware datastore create` has been removed. Please use `az vmware datastore netapp-volume create` or `az vmware datastore disk-pool-volume create` instead. Other changes: @@ -11,6 +11,7 @@ Other changes: - Add `az vmware addon hcx` command group to manage a HCX addon - Add `az vmware addon srm` command group to manage a Site Recovery Manager (SRM) addon - Add `az vmware addon vr` command group to manage a vSphere Replication (VR) addon +- Add `az vmware global-reach-connection` command group to manage Global Reach Connections ## 2.0.1 (2021-02) - Update the minimum az cli version to 2.11.0 [#3045](https://github.com/Azure/azure-cli-extensions/issues/3045) diff --git a/src/vmware/DEVELOPMENT.md b/src/vmware/DEVELOPMENT.md index 2866426b5ba..f586b27bf62 100644 --- a/src/vmware/DEVELOPMENT.md +++ b/src/vmware/DEVELOPMENT.md @@ -6,3 +6,8 @@ rm ..\azure-cli-extensions\src\vmware\azext_vmware\vendored_sdks -Recurse autorest --python --output-folder=..\azure-cli-extensions\src\vmware\azext_vmware\vendored_sdks --use=@autorest/python@5.8.0 --tag=package-2021-06-01 --azure-arm=true --namespace=avs_client --override-client-name=AVSClient specification\vmware\resource-manager\readme.md ``` It was run from a git clone of [azure-rest-api-specs](https://github.com/Azure/azure-rest-api-specs). + +## Linter +Use [azdev](https://github.com/Azure/azure-cli-dev-tools) to check for linter errors and warnings. +- `azdev style vmware` +- `azdev linter --include-whl-extensions vmware` diff --git a/src/vmware/azext_vmware/__init__.py b/src/vmware/azext_vmware/__init__.py index 872d9e285d5..5cdf51e3df0 100644 --- a/src/vmware/azext_vmware/__init__.py +++ b/src/vmware/azext_vmware/__init__.py @@ -15,8 +15,7 @@ def __init__(self, cli_ctx=None): vmware_custom = CliCommandType( operations_tmpl='azext_vmware.custom#{}', client_factory=cf_vmware) - super(VmwareCommandsLoader, self).__init__(cli_ctx=cli_ctx, - custom_command_type=vmware_custom) + super(VmwareCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=vmware_custom) # pylint: disable=super-with-arguments def load_command_table(self, args): from azext_vmware.commands import load_command_table diff --git a/src/vmware/azext_vmware/_help.py b/src/vmware/azext_vmware/_help.py index ecda202e798..0d30d76d60c 100644 --- a/src/vmware/azext_vmware/_help.py +++ b/src/vmware/azext_vmware/_help.py @@ -277,7 +277,7 @@ short-summary: Create a Site Recovery Manager (SRM) addon for a private cloud. examples: - name: Create a Site Recovery Manager (SRM) addon. - text: az vmware addon srm create --resource-group MyResourceGroup --private-cloud MyPrivateCloud --license-key "41915178-A8FF-4A4D-B683-6D735AF5E3F5" + text: az vmware addon srm create --resource-group MyResourceGroup --private-cloud MyPrivateCloud --license-key "41915-178A8-FF4A4-DB683-6D735" """ helps['vmware addon vr show'] = """ @@ -325,7 +325,7 @@ short-summary: Update a Site Recovery Manager (SRM) addon for a private cloud. examples: - name: Update a Site Recovery Manager (SRM) addon. - text: az vmware addon srm update --resource-group MyResourceGroup --private-cloud MyPrivateCloud --license-key "41915178-A8FF-4A4D-B683-6D735AF5E3F5" + text: az vmware addon srm update --resource-group MyResourceGroup --private-cloud MyPrivateCloud --license-key "41915-178A8-FF4A4-DB683-6D735" """ helps['vmware addon vr delete'] = """ @@ -351,3 +351,28 @@ - name: Delete a Site Recovery Manager (SRM) addon. text: az vmware addon srm delete --resource-group MyResourceGroup --private-cloud MyPrivateCloud """ + +helps['vmware global-reach-connection'] = """ + type: group + short-summary: Commands to manage global reach connections in a private cloud. +""" + +helps['vmware global-reach-connection create'] = """ + type: command + short-summary: Create a global reach connection in a private cloud. +""" + +helps['vmware global-reach-connection list'] = """ + type: command + short-summary: List global reach connections in a private cloud. +""" + +helps['vmware global-reach-connection show'] = """ + type: command + short-summary: Show details of a global reach connection in a private cloud. +""" + +helps['vmware global-reach-connection delete'] = """ + type: command + short-summary: Delete a global reach connection in a private cloud. +""" diff --git a/src/vmware/azext_vmware/_params.py b/src/vmware/azext_vmware/_params.py index c0119f22bef..a86b0c6d532 100644 --- a/src/vmware/azext_vmware/_params.py +++ b/src/vmware/azext_vmware/_params.py @@ -2,7 +2,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -# pylint: disable=line-too-long +# pylint: disable=line-too-long,too-many-statements def load_arguments(self, _): @@ -100,3 +100,10 @@ def load_arguments(self, _): with self.argument_context('vmware addon srm') as c: c.argument('license_key', help='The Site Recovery Manager (SRM) license.') + + with self.argument_context('vmware global-reach-connection') as c: + c.argument('name', options_list=['--name', '-n'], help='Name of the global reach connection.') + + with self.argument_context('vmware global-reach-connection create') as c: + c.argument('peer_express_route_circuit', help='Identifier of the ExpressRoute Circuit to peer with.') + c.argument('authorization_key', help='Authorization key from the peer express route.') diff --git a/src/vmware/azext_vmware/_validators.py b/src/vmware/azext_vmware/_validators.py index d36dc1a8ff4..b2aedfa0a4f 100644 --- a/src/vmware/azext_vmware/_validators.py +++ b/src/vmware/azext_vmware/_validators.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long def example_name_or_id_validator(cmd, namespace): diff --git a/src/vmware/azext_vmware/commands.py b/src/vmware/azext_vmware/commands.py index e47c3516b27..af09172e119 100644 --- a/src/vmware/azext_vmware/commands.py +++ b/src/vmware/azext_vmware/commands.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long,too-many-statements from azure.cli.core.commands import CliCommandType from azext_vmware._client_factory import cf_vmware @@ -80,3 +81,9 @@ def load_command_table(self, _): g.custom_show_command('show', 'addon_srm_show') g.custom_command('update', 'addon_srm_update') g.custom_command('delete', 'addon_srm_delete') + + with self.command_group('vmware global-reach-connection', vmware_sdk, client_factory=cf_vmware) as g: + g.custom_command('create', 'globalreachconnection_create') + g.custom_command('list', 'globalreachconnection_list') + g.custom_command('delete', 'globalreachconnection_delete') + g.custom_show_command('show', 'globalreachconnection_show') diff --git a/src/vmware/azext_vmware/custom.py b/src/vmware/azext_vmware/custom.py index 6b9e61100ea..81b9e287830 100644 --- a/src/vmware/azext_vmware/custom.py +++ b/src/vmware/azext_vmware/custom.py @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long -from knack.util import CLIError from azext_vmware.vendored_sdks.avs_client import AVSClient LEGAL_TERMS = ''' @@ -21,24 +21,23 @@ ''' -def privatecloud_list(cmd, client: AVSClient, resource_group_name=None): +def privatecloud_list(client: AVSClient, resource_group_name=None): if resource_group_name is None: return client.private_clouds.list_in_subscription() - else: - return client.private_clouds.list(resource_group_name) + return client.private_clouds.list(resource_group_name) -def privatecloud_show(cmd, client: AVSClient, resource_group_name, name): +def privatecloud_show(client: AVSClient, resource_group_name, name): return client.private_clouds.get(resource_group_name, name) -def privatecloud_create(cmd, client: AVSClient, resource_group_name, name, location, sku, cluster_size, network_block, circuit_primary_subnet=None, circuit_secondary_subnet=None, internet=None, vcenter_password=None, nsxt_password=None, tags=[], accept_eula=False): +def privatecloud_create(client: AVSClient, resource_group_name, name, location, sku, cluster_size, network_block, circuit_primary_subnet=None, circuit_secondary_subnet=None, internet=None, vcenter_password=None, nsxt_password=None, tags=None, accept_eula=False): from knack.prompting import prompt_y_n if not accept_eula: print(LEGAL_TERMS) msg = 'Do you agree to the above additional terms for AVS?' if not prompt_y_n(msg, default="n"): - return + return None from azext_vmware.vendored_sdks.avs_client.models import PrivateCloud, Circuit, ManagementCluster, Sku if circuit_primary_subnet is not None or circuit_secondary_subnet is not None: @@ -56,7 +55,7 @@ def privatecloud_create(cmd, client: AVSClient, resource_group_name, name, locat return client.private_clouds.begin_create_or_update(resource_group_name, name, cloud) -def privatecloud_update(cmd, client: AVSClient, resource_group_name, name, cluster_size=None, internet=None): +def privatecloud_update(client: AVSClient, resource_group_name, name, cluster_size=None, internet=None): from azext_vmware.vendored_sdks.avs_client.models import PrivateCloudUpdate, ManagementCluster private_cloud_update = PrivateCloudUpdate() if cluster_size is not None: @@ -66,19 +65,19 @@ def privatecloud_update(cmd, client: AVSClient, resource_group_name, name, clust return client.private_clouds.begin_update(resource_group_name, name, private_cloud_update) -def privatecloud_delete(cmd, client: AVSClient, resource_group_name, name, yes=False): +def privatecloud_delete(client: AVSClient, resource_group_name, name, yes=False): from knack.prompting import prompt_y_n msg = 'This will delete the private cloud. Are you sure?' if not yes and not prompt_y_n(msg, default="n"): - return + return None return client.private_clouds.begin_delete(resource_group_name, name) -def privatecloud_listadmincredentials(cmd, client: AVSClient, resource_group_name, private_cloud): +def privatecloud_listadmincredentials(client: AVSClient, resource_group_name, private_cloud): return client.private_clouds.list_admin_credentials(resource_group_name=resource_group_name, private_cloud_name=private_cloud) -def privatecloud_addidentitysource(cmd, client: AVSClient, resource_group_name, name, private_cloud, alias, domain, base_user_dn, base_group_dn, primary_server, username, password, secondary_server=None, ssl="Disabled"): +def privatecloud_addidentitysource(client: AVSClient, resource_group_name, name, private_cloud, alias, domain, base_user_dn, base_group_dn, primary_server, username, password, secondary_server=None, ssl="Disabled"): from azext_vmware.vendored_sdks.avs_client.models import IdentitySource pc = client.private_clouds.get(resource_group_name, private_cloud) identitysource = IdentitySource(name=name, alias=alias, domain=domain, base_user_dn=base_user_dn, base_group_dn=base_group_dn, primary_server=primary_server, ssl=ssl, username=username, password=password) @@ -88,174 +87,188 @@ def privatecloud_addidentitysource(cmd, client: AVSClient, resource_group_name, return client.private_clouds.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, private_cloud=pc) -def privatecloud_deleteidentitysource(cmd, client: AVSClient, resource_group_name, name, private_cloud, alias, domain): - from azext_vmware.vendored_sdks.avs_client.models import IdentitySource +def privatecloud_deleteidentitysource(client: AVSClient, resource_group_name, name, private_cloud, alias, domain): pc = client.private_clouds.get(resource_group_name, private_cloud) found = next((ids for ids in pc.identity_sources if ids.name == name and ids.alias == alias and ids.domain == domain), None) if found: pc.identity_sources.remove(found) return client.private_clouds.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, private_cloud=pc) - else: - return pc + return pc -def privatecloud_rotate_vcenter_password(cmd, client: AVSClient, resource_group_name, private_cloud): +def privatecloud_rotate_vcenter_password(client: AVSClient, resource_group_name, private_cloud): return client.private_clouds.begin_rotate_vcenter_password(resource_group_name=resource_group_name, private_cloud_name=private_cloud) -def privatecloud_rotate_nsxt_password(cmd, client: AVSClient, resource_group_name, private_cloud): +def privatecloud_rotate_nsxt_password(client: AVSClient, resource_group_name, private_cloud): return client.private_clouds.begin_rotate_nsxt_password(resource_group_name=resource_group_name, private_cloud_name=private_cloud) -def cluster_create(cmd, client: AVSClient, resource_group_name, name, sku, private_cloud, size, tags=[]): +def cluster_create(client: AVSClient, resource_group_name, name, sku, private_cloud, size): from azext_vmware.vendored_sdks.avs_client.models import Sku return client.clusters.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=name, sku=Sku(name=sku), cluster_size=size) -def cluster_update(cmd, client: AVSClient, resource_group_name, name, private_cloud, size, tags=[]): +def cluster_update(client: AVSClient, resource_group_name, name, private_cloud, size): return client.clusters.begin_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=name, cluster_size=size) -def cluster_list(cmd, client: AVSClient, resource_group_name, private_cloud): +def cluster_list(client: AVSClient, resource_group_name, private_cloud): return client.clusters.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud) -def cluster_show(cmd, client: AVSClient, resource_group_name, private_cloud, name): +def cluster_show(client: AVSClient, resource_group_name, private_cloud, name): return client.clusters.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=name) -def cluster_delete(cmd, client: AVSClient, resource_group_name, private_cloud, name): +def cluster_delete(client: AVSClient, resource_group_name, private_cloud, name): return client.clusters.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=name) -def check_quota_availability(cmd, client: AVSClient, location): +def check_quota_availability(client: AVSClient, location): return client.locations.check_quota_availability(location) -def check_trial_availability(cmd, client: AVSClient, location): +def check_trial_availability(client: AVSClient, location): return client.locations.check_trial_availability(location) -def authorization_create(cmd, client: AVSClient, resource_group_name, private_cloud, name): +def authorization_create(client: AVSClient, resource_group_name, private_cloud, name): return client.authorizations.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, authorization_name=name) -def authorization_list(cmd, client: AVSClient, resource_group_name, private_cloud): +def authorization_list(client: AVSClient, resource_group_name, private_cloud): return client.authorizations.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud) -def authorization_show(cmd, client: AVSClient, resource_group_name, private_cloud, name): +def authorization_show(client: AVSClient, resource_group_name, private_cloud, name): return client.authorizations.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, authorization_name=name) -def authorization_delete(cmd, client: AVSClient, resource_group_name, private_cloud, name): +def authorization_delete(client: AVSClient, resource_group_name, private_cloud, name): return client.authorizations.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, authorization_name=name) -def hcxenterprisesite_create(cmd, client: AVSClient, resource_group_name, private_cloud, name): +def hcxenterprisesite_create(client: AVSClient, resource_group_name, private_cloud, name): return client.hcx_enterprise_sites.create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, hcx_enterprise_site_name=name) -def hcxenterprisesite_list(cmd, client: AVSClient, resource_group_name, private_cloud): +def hcxenterprisesite_list(client: AVSClient, resource_group_name, private_cloud): return client.hcx_enterprise_sites.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud) -def hcxenterprisesite_show(cmd, client: AVSClient, resource_group_name, private_cloud, name): +def hcxenterprisesite_show(client: AVSClient, resource_group_name, private_cloud, name): return client.hcx_enterprise_sites.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, hcx_enterprise_site_name=name) -def hcxenterprisesite_delete(cmd, client: AVSClient, resource_group_name, private_cloud, name): +def hcxenterprisesite_delete(client: AVSClient, resource_group_name, private_cloud, name): return client.hcx_enterprise_sites.delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, hcx_enterprise_site_name=name) -def datastore_create(cmd, client: AVSClient, resource_group_name, private_cloud, cluster, name, nfs_provider_ip=None, nfs_file_path=None, endpoints=[], lun_name=None): +def datastore_create(): print('Please use "az vmware datastore netapp-volume create" or "az vmware datastore disk-pool-volume create" instead.') -def datastore_netappvolume_create(cmd, client: AVSClient, resource_group_name, private_cloud, cluster, name, volume_id): +def datastore_netappvolume_create(client: AVSClient, resource_group_name, private_cloud, cluster, name, volume_id): from azext_vmware.vendored_sdks.avs_client.models import NetAppVolume net_app_volume = NetAppVolume(id=volume_id) return client.datastores.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster, datastore_name=name, net_app_volume=net_app_volume, disk_pool_volume=None) -def datastore_diskpoolvolume_create(cmd, client: AVSClient, resource_group_name, private_cloud, cluster, name, target_id, lun_name, mount_option="MOUNT", path=None): +def datastore_diskpoolvolume_create(client: AVSClient, resource_group_name, private_cloud, cluster, name, target_id, lun_name, mount_option="MOUNT", path=None): from azext_vmware.vendored_sdks.avs_client.models import DiskPoolVolume disk_pool_volume = DiskPoolVolume(target_id=target_id, lun_name=lun_name, mount_option=mount_option, path=path) return client.datastores.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster, datastore_name=name, net_app_volume=None, disk_pool_volume=disk_pool_volume) -def datastore_list(cmd, client: AVSClient, resource_group_name, private_cloud, cluster): +def datastore_list(client: AVSClient, resource_group_name, private_cloud, cluster): return client.datastores.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster) -def datastore_show(cmd, client: AVSClient, resource_group_name, private_cloud, cluster, name): +def datastore_show(client: AVSClient, resource_group_name, private_cloud, cluster, name): return client.datastores.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster, datastore_name=name) -def datastore_delete(cmd, client: AVSClient, resource_group_name, private_cloud, cluster, name): +def datastore_delete(client: AVSClient, resource_group_name, private_cloud, cluster, name): return client.datastores.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster, datastore_name=name) -def addon_list(cmd, client: AVSClient, resource_group_name, private_cloud): +def addon_list(client: AVSClient, resource_group_name, private_cloud): return client.addons.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud) -def addon_vr_create(cmd, client: AVSClient, resource_group_name, private_cloud, vrs_count: int): - from azext_vmware.vendored_sdks.avs_client.models import Addon, AddonVrProperties +def addon_vr_create(client: AVSClient, resource_group_name, private_cloud, vrs_count: int): + from azext_vmware.vendored_sdks.avs_client.models import AddonVrProperties properties = AddonVrProperties(vrs_count=vrs_count) return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="vr", properties=properties) -def addon_hcx_create(cmd, client: AVSClient, resource_group_name, private_cloud, offer: str): - from azext_vmware.vendored_sdks.avs_client.models import Addon, AddonHcxProperties +def addon_hcx_create(client: AVSClient, resource_group_name, private_cloud, offer: str): + from azext_vmware.vendored_sdks.avs_client.models import AddonHcxProperties properties = AddonHcxProperties(offer=offer) return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="hcx", properties=properties) -def addon_srm_create(cmd, client: AVSClient, resource_group_name, private_cloud, license_key: str): - from azext_vmware.vendored_sdks.avs_client.models import Addon, AddonSrmProperties +def addon_srm_create(client: AVSClient, resource_group_name, private_cloud, license_key: str): + from azext_vmware.vendored_sdks.avs_client.models import AddonSrmProperties properties = AddonSrmProperties(license_key=license_key) return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="srm", properties=properties) -def addon_vr_show(cmd, client: AVSClient, resource_group_name, private_cloud): +def addon_vr_show(client: AVSClient, resource_group_name, private_cloud): return client.addons.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="vr") -def addon_hcx_show(cmd, client: AVSClient, resource_group_name, private_cloud): +def addon_hcx_show(client: AVSClient, resource_group_name, private_cloud): return client.addons.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="hcx") -def addon_srm_show(cmd, client: AVSClient, resource_group_name, private_cloud): +def addon_srm_show(client: AVSClient, resource_group_name, private_cloud): return client.addons.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="srm") -def addon_vr_update(cmd, client: AVSClient, resource_group_name, private_cloud, vrs_count: int): - from azext_vmware.vendored_sdks.avs_client.models import Addon, AddonVrProperties +def addon_vr_update(client: AVSClient, resource_group_name, private_cloud, vrs_count: int): + from azext_vmware.vendored_sdks.avs_client.models import AddonVrProperties properties = AddonVrProperties(vrs_count=vrs_count) return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="vr", properties=properties) -def addon_hcx_update(cmd, client: AVSClient, resource_group_name, private_cloud, offer: str): - from azext_vmware.vendored_sdks.avs_client.models import Addon, AddonHcxProperties +def addon_hcx_update(client: AVSClient, resource_group_name, private_cloud, offer: str): + from azext_vmware.vendored_sdks.avs_client.models import AddonHcxProperties properties = AddonHcxProperties(offer=offer) return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="hcx", properties=properties) -def addon_srm_update(cmd, client: AVSClient, resource_group_name, private_cloud, license_key: str): - from azext_vmware.vendored_sdks.avs_client.models import Addon, AddonSrmProperties +def addon_srm_update(client: AVSClient, resource_group_name, private_cloud, license_key: str): + from azext_vmware.vendored_sdks.avs_client.models import AddonSrmProperties properties = AddonSrmProperties(license_key=license_key) return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="srm", properties=properties) -def addon_vr_delete(cmd, client: AVSClient, resource_group_name, private_cloud): +def addon_vr_delete(client: AVSClient, resource_group_name, private_cloud): return client.addons.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="vr") -def addon_hcx_delete(cmd, client: AVSClient, resource_group_name, private_cloud): +def addon_hcx_delete(client: AVSClient, resource_group_name, private_cloud): return client.addons.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="hcx") -def addon_srm_delete(cmd, client: AVSClient, resource_group_name, private_cloud): +def addon_srm_delete(client: AVSClient, resource_group_name, private_cloud): return client.addons.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="srm") + + +def globalreachconnection_create(client: AVSClient, resource_group_name, private_cloud, name, authorization_key=None, peer_express_route_circuit=None): + return client.global_reach_connections.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, global_reach_connection_name=name, authorization_key=authorization_key, peer_express_route_circuit=peer_express_route_circuit) + + +def globalreachconnection_list(client: AVSClient, resource_group_name, private_cloud): + return client.global_reach_connections.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud) + + +def globalreachconnection_show(client: AVSClient, resource_group_name, private_cloud, name): + return client.global_reach_connections.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, global_reach_connection_name=name) + + +def globalreachconnection_delete(client: AVSClient, resource_group_name, private_cloud, name): + return client.global_reach_connections.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, global_reach_connection_name=name) diff --git a/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_addon.yaml b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_addon.yaml index 03337806818..6950c6b262f 100644 --- a/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_addon.yaml +++ b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_addon.yaml @@ -23,7 +23,7 @@ interactions: x-client-Ver: - 1.2.3 method: GET - uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 response: body: string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' @@ -39,13 +39,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:14:55 GMT + - Tue, 22 Jun 2021 14:26:12 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=AlgsTiJUP3FIrRG1JcPVEMw; expires=Sun, 04-Jul-2021 01:14:55 GMT; path=/; + - fpc=Ag7RmEAofDVCkHeKzXTSl3Y; expires=Thu, 22-Jul-2021 14:26:12 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevroOhDcX_mPGRtljDDj4Q1klOhQMVEbcBZ9y7OzKwXqUIF7_bFwRKIdtOazpn_-QnFYhG_ZQzU4lH1B2TWhj3Hj1VidKUhamjDcb3sMdb8AGa7po1-pVR0yK559ciAQ87U_9pKNiTberfEjvg-2zUYPjKgeD8aMZMoW3LZzWHFAdggAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrzYX5pqjfocXUFB3gXv1Bolu-crimgQVjhs240rCxupR2CVNOOLKKyemDoRLBgYVOGY7kwMbi4lDCR2zpR2xKlVZBNPRP2i0EK-P9NhZVkL8in6vE0h6Z6Kxmum6bKV0A7yzvyhqqV5RFURSJWoTPzqWkqlApRO3TtjbJ2A_fl4QgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -54,7 +54,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11722.21 - NCUS ProdSlices + - 2.1.11829.4 - WUS2 ProdSlices status: code: 200 message: OK @@ -80,21 +80,21 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1","location":"northcentralus","name":"mycloud1","properties":{"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost31.mp01.mock01.vmcp.vs.management","gp-fakehost30.mp01.mock01.vmcp.vs.management","gp-fakehost29.mp01.mock01.vmcp.vs.management","gp-fakehost28.mp01.mock01.vmcp.vs.management"],"provisioningState":"Building"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","provisioningNetwork":"192.168.50.0/24","provisioningState":"Building","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1","location":"northcentralus","name":"mycloud1","properties":{"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost42.mp01.mock01.vmcp.vs.management","gp-fakehost41.mp01.mock01.vmcp.vs.management","gp-fakehost38.mp01.mock01.vmcp.vs.management","gp-fakehost39.mp01.mock01.vmcp.vs.management"],"provisioningState":"Building"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","provisioningNetwork":"192.168.50.0/25","provisioningState":"Building","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' headers: azure-asyncoperation: - - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33?api-version=2021-06-01 cache-control: - no-cache content-length: - - '978' + - '980' content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:15:02 GMT + - Tue, 22 Jun 2021 14:26:25 GMT expires: - '-1' pragma: @@ -108,7 +108,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '1199' x-msedge-ref: - - 'Ref A: E68EC5C3FDB047D4851EDEE0B4C2C12F Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:14:55Z' + - 'Ref A: E665DED7E34D401991A3DF1BDDA97E14 Ref B: LAX311000113019 Ref C: 2021-06-22T14:26:14Z' status: code: 201 message: Created @@ -128,10 +128,10 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":0,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33","name":"36755fb6-4acb-41ff-b64d-30fdc320fb33","percentComplete":0,"startTime":"2021-06-22T14:26:25.1286132+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -140,7 +140,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:15:12 GMT + - Tue, 22 Jun 2021 14:26:35 GMT expires: - '-1' pragma: @@ -152,7 +152,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: 3C9C78087AB4450AB94EA2AF141D7E31 Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:15:12Z' + - 'Ref A: 88C5609070D540408506367BAE82E776 Ref B: LAX311000113019 Ref C: 2021-06-22T14:26:35Z' status: code: 200 message: OK @@ -172,10 +172,10 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":0,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33","name":"36755fb6-4acb-41ff-b64d-30fdc320fb33","percentComplete":0,"startTime":"2021-06-22T14:26:25.1286132+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -184,7 +184,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:15:22 GMT + - Tue, 22 Jun 2021 14:26:46 GMT expires: - '-1' pragma: @@ -196,7 +196,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: E8149F6885704EF1A6059802FA972DA3 Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:15:22Z' + - 'Ref A: 6CDCFC648EB04D01965E2DD01F69320B Ref B: LAX311000113019 Ref C: 2021-06-22T14:26:46Z' status: code: 200 message: OK @@ -216,10 +216,10 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":88.75,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33","name":"36755fb6-4acb-41ff-b64d-30fdc320fb33","percentComplete":88.75,"startTime":"2021-06-22T14:26:25.1286132+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -228,7 +228,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:15:32 GMT + - Tue, 22 Jun 2021 14:26:56 GMT expires: - '-1' pragma: @@ -240,7 +240,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: 1E35F494A033475ABBC44E4D06E27C96 Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:15:32Z' + - 'Ref A: 8F35A3655D2549879682543EA2B763ED Ref B: LAX311000113019 Ref C: 2021-06-22T14:26:56Z' status: code: 200 message: OK @@ -260,10 +260,10 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":88.75,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33","name":"36755fb6-4acb-41ff-b64d-30fdc320fb33","percentComplete":88.75,"startTime":"2021-06-22T14:26:25.1286132+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -272,7 +272,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:15:42 GMT + - Tue, 22 Jun 2021 14:27:06 GMT expires: - '-1' pragma: @@ -284,7 +284,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: 7CB1EF3BBB6242BD84744AD93F32F01F Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:15:43Z' + - 'Ref A: 7A00B94E2BF44DE9A42A20EEC7912985 Ref B: LAX311000113019 Ref C: 2021-06-22T14:27:06Z' status: code: 200 message: OK @@ -304,10 +304,10 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":100,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33","name":"36755fb6-4acb-41ff-b64d-30fdc320fb33","percentComplete":100,"startTime":"2021-06-22T14:26:25.1286132+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -316,7 +316,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:15:52 GMT + - Tue, 22 Jun 2021 14:27:16 GMT expires: - '-1' pragma: @@ -328,7 +328,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: 8443BC2B28004A9B972D37F1056652D8 Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:15:53Z' + - 'Ref A: BD7E470595934875B39A3F73426275CA Ref B: LAX311000113019 Ref C: 2021-06-22T14:27:17Z' status: code: 200 message: OK @@ -348,10 +348,10 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":100,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33","name":"36755fb6-4acb-41ff-b64d-30fdc320fb33","percentComplete":100,"startTime":"2021-06-22T14:26:25.1286132+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -360,7 +360,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:16:03 GMT + - Tue, 22 Jun 2021 14:27:27 GMT expires: - '-1' pragma: @@ -372,7 +372,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: 56563E9676834382A7C124F7A9E6C27C Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:16:03Z' + - 'Ref A: A39BA79AE2A84B83A049CD415745256D Ref B: LAX311000113019 Ref C: 2021-06-22T14:27:27Z' status: code: 200 message: OK @@ -392,10 +392,10 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":100,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33","name":"36755fb6-4acb-41ff-b64d-30fdc320fb33","percentComplete":100,"startTime":"2021-06-22T14:26:25.1286132+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -404,7 +404,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:16:13 GMT + - Tue, 22 Jun 2021 14:27:37 GMT expires: - '-1' pragma: @@ -416,7 +416,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: CE377FAB2F8E475391A3ADAF1B2605B8 Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:16:13Z' + - 'Ref A: 710981C0ABD64AD8A1EA3575D3AEA44D Ref B: LAX311000113019 Ref C: 2021-06-22T14:27:37Z' status: code: 200 message: OK @@ -436,10 +436,10 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":100,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33","name":"36755fb6-4acb-41ff-b64d-30fdc320fb33","percentComplete":100,"startTime":"2021-06-22T14:26:25.1286132+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -448,7 +448,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:16:23 GMT + - Tue, 22 Jun 2021 14:27:47 GMT expires: - '-1' pragma: @@ -460,7 +460,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: D45A7CD0E487479E81BFDC4A868EAF3C Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:16:23Z' + - 'Ref A: DE2E51E344CD4EB7B7325817790A15B6 Ref B: LAX311000113019 Ref C: 2021-06-22T14:27:47Z' status: code: 200 message: OK @@ -480,10 +480,10 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":100,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33","name":"36755fb6-4acb-41ff-b64d-30fdc320fb33","percentComplete":100,"startTime":"2021-06-22T14:26:25.1286132+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -492,7 +492,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:16:33 GMT + - Tue, 22 Jun 2021 14:27:58 GMT expires: - '-1' pragma: @@ -504,7 +504,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: 39E7E3BD1F684223BDC2327C0B6BE7AB Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:16:34Z' + - 'Ref A: 39B86360B53D4B03B981AC89BAC90692 Ref B: LAX311000113019 Ref C: 2021-06-22T14:27:58Z' status: code: 200 message: OK @@ -524,10 +524,10 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":100,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33","name":"36755fb6-4acb-41ff-b64d-30fdc320fb33","percentComplete":100,"startTime":"2021-06-22T14:26:25.1286132+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -536,7 +536,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:16:43 GMT + - Tue, 22 Jun 2021 14:28:08 GMT expires: - '-1' pragma: @@ -548,7 +548,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: 61BE8D450CC84B6D874D67E301B4602D Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:16:44Z' + - 'Ref A: B463EAD80F68420696A089E8B01D0CBD Ref B: LAX311000113019 Ref C: 2021-06-22T14:28:08Z' status: code: 200 message: OK @@ -568,10 +568,10 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":100,"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33","name":"36755fb6-4acb-41ff-b64d-30fdc320fb33","percentComplete":100,"startTime":"2021-06-22T14:26:25.1286132+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -580,7 +580,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:16:54 GMT + - Tue, 22 Jun 2021 14:28:18 GMT expires: - '-1' pragma: @@ -592,7 +592,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: 8E7EE79974CD48D69F3F24C221E84547 Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:16:54Z' + - 'Ref A: 0D122BF089964235A7401AC8BC298B0C Ref B: LAX311000113019 Ref C: 2021-06-22T14:28:18Z' status: code: 200 message: OK @@ -612,19 +612,63 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33?api-version=2021-06-01 response: body: - string: '{"endTime":"2021-06-04T01:16:59.2258667+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","name":"74262fa0-62b2-430b-a9b5-1fc7ea3e97e6","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1","location":"northcentralus","name":"mycloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt75-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt75-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt75-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt75-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost31.mp01.mock01.vmcp.vs.management","gp-fakehost30.mp01.mock01.vmcp.vs.management","gp-fakehost29.mp01.mock01.vmcp.vs.management","gp-fakehost28.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2021-06-04T01:15:01.9605806+00:00","status":"Succeeded"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33","name":"36755fb6-4acb-41ff-b64d-30fdc320fb33","percentComplete":100,"startTime":"2021-06-22T14:26:25.1286132+00:00","status":"Building"}' headers: cache-control: - no-cache content-length: - - '2069' + - '389' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:28:28 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 4AC5AFB36A30403E989107A5CE9FC336 Ref B: LAX311000113019 Ref C: 2021-06-22T14:28:28Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33?api-version=2021-06-01 + response: + body: + string: '{"endTime":"2021-06-22T14:28:26.7438593+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/operationstatuses/36755fb6-4acb-41ff-b64d-30fdc320fb33","name":"36755fb6-4acb-41ff-b64d-30fdc320fb33","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1","location":"northcentralus","name":"mycloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt24-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt24-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt24-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt24-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost42.mp01.mock01.vmcp.vs.management","gp-fakehost41.mp01.mock01.vmcp.vs.management","gp-fakehost38.mp01.mock01.vmcp.vs.management","gp-fakehost39.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2021-06-22T14:26:25.1286132+00:00","status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '2074' content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:17:04 GMT + - Tue, 22 Jun 2021 14:28:39 GMT expires: - '-1' pragma: @@ -636,7 +680,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: 21BFA2A2E7A449458A670AA6AD99DFE9 Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:17:04Z' + - 'Ref A: B4050301F5314410B2403D97CCCA502B Ref B: LAX311000113019 Ref C: 2021-06-22T14:28:39Z' status: code: 200 message: OK @@ -656,19 +700,19 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1","location":"northcentralus","name":"mycloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt75-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt75-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt75-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt75-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.51.8/30","secondarySubnet":"192.168.51.12/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost31.mp01.mock01.vmcp.vs.management","gp-fakehost30.mp01.mock01.vmcp.vs.management","gp-fakehost29.mp01.mock01.vmcp.vs.management","gp-fakehost28.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/24","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/24","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.0/24"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1","location":"northcentralus","name":"mycloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt24-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt24-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt24-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt24-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost42.mp01.mock01.vmcp.vs.management","gp-fakehost41.mp01.mock01.vmcp.vs.management","gp-fakehost38.mp01.mock01.vmcp.vs.management","gp-fakehost39.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' headers: cache-control: - no-cache content-length: - - '1619' + - '1624' content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:17:04 GMT + - Tue, 22 Jun 2021 14:28:39 GMT expires: - '-1' pragma: @@ -680,7 +724,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: 69D9634CE9004CDDB99625AC5789B76E Ref B: PDX31EDGE0113 Ref C: 2021-06-04T01:17:04Z' + - 'Ref A: 2ED2A13699554EE28E4905D6CEE24542 Ref B: LAX311000113019 Ref C: 2021-06-22T14:28:39Z' status: code: 200 message: OK @@ -708,7 +752,7 @@ interactions: x-client-Ver: - 1.2.3 method: GET - uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 response: body: string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' @@ -724,13 +768,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:17:05 GMT + - Tue, 22 Jun 2021 14:28:42 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=AvJdidjTajVMpJI6tkbvCgo; expires=Sun, 04-Jul-2021 01:17:05 GMT; path=/; + - fpc=Al-jRvG9QitPrMBjVWS3qcQ; expires=Thu, 22-Jul-2021 14:28:42 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr2HJdDjtvCUrc2CeixeTXUBlvXJa7xGTkRWj3QOC-vOovJC3V9rumQ0fEYRqDFnkm66LsbdmoSZ7AKI4NAjKSl2VBecA-FEcFIPF81X9KxnfKctgp-f1ofDu2TWqlxfQawS87iGb0-3BFgbEds96nGVgXWd6g5TEwcRiU5HBFW7EgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrI78JItPXDBKyxYJUWTDJ82ydX99vWo_-ac1LG--7VWAGYbBVPl1PB-AfCoxlnjQxXwdi5Knr5pdYw0YCfTkHpIswdJl8c-wk371v1PaiF0PAR0_lEINeE4l7lWrdVMnnQlim2rRG20o7gK7VOcWawFPrX4wEim6KKtJ3WCiuBRkgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -739,7 +783,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11722.26 - SCUS ProdSlices + - 2.1.11829.4 - NCUS ProdSlices status: code: 200 message: OK @@ -759,7 +803,7 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons?api-version=2021-06-01 response: body: string: '{"value":[]}' @@ -771,7 +815,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:17:05 GMT + - Tue, 22 Jun 2021 14:28:44 GMT expires: - '-1' pragma: @@ -783,7 +827,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: D13ED1D68C0540809F10B1649E335D27 Ref B: PDX31EDGE0119 Ref C: 2021-06-04T01:17:05Z' + - 'Ref A: 0B4BCDC41075475ABFAC89CA920E29CD Ref B: LAXEDGE1516 Ref C: 2021-06-22T14:28:44Z' status: code: 200 message: OK @@ -811,7 +855,7 @@ interactions: x-client-Ver: - 1.2.3 method: GET - uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 response: body: string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' @@ -827,13 +871,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:17:06 GMT + - Tue, 22 Jun 2021 14:28:47 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=AvKvRMVhyU1CmxNvwH7muzo; expires=Sun, 04-Jul-2021 01:17:06 GMT; path=/; + - fpc=AkHPXhR209pMvYq0U1G1FBc; expires=Thu, 22-Jul-2021 14:28:48 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrGimviEVQAG9CE5uWHnVUH1iSNMJyfPFGLD5aiR1SsWUJ2bwj12Yr0BXSuApQkfLRdhsHVerqBxK_ZWgerN5cO0xS4MfR6W49nL2fUliquL-4GcMNfgGFR5AXlDvfoP9Q1_GXzSC4Swl5VAdTANgVDVt3P8UGK71z28tsPNRJkkwgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrkGquA-G5lGSwmeoPd9bT8AOvNz70Uxo8k7AQhL9S5AAxvfascqgtGQT5TEzZv4qZQDjuTj7XLLxP8pzxZlzgFUk2C2zjFu1jpZOAfKbbVgULGXiDraY-x7ka5gbQpp70os1dKVtT3YORGYtHo-dl6QJjdzptGvPaaV9aK4rHBacgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -842,7 +886,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11787.14 - SCUS ProdSlices + - 2.1.11829.8 - WUS2 ProdSlices status: code: 200 message: OK @@ -866,13 +910,13 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr?api-version=2021-06-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Building","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"}' headers: azure-asyncoperation: - - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b?api-version=2021-06-01 + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/123d1b24-3710-462c-893b-c5c18d71eb24?api-version=2021-06-01 cache-control: - no-cache content-length: @@ -880,7 +924,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:17:07 GMT + - Tue, 22 Jun 2021 14:28:51 GMT expires: - '-1' pragma: @@ -892,9 +936,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1195' + - '1199' x-msedge-ref: - - 'Ref A: 6AFFE1DDE1DD4B97918375009ABF1AC6 Ref B: PDX31EDGE0120 Ref C: 2021-06-04T01:17:06Z' + - 'Ref A: B4C3BFE125314C56884365824DCF8C27 Ref B: LAX311000110051 Ref C: 2021-06-22T14:28:50Z' status: code: 201 message: Created @@ -914,10 +958,10 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/123d1b24-3710-462c-893b-c5c18d71eb24?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b","name":"a7c4a7bb-f176-4443-accf-52606e7b907b","percentComplete":25,"startTime":"2021-06-04T01:17:07.6503196+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/123d1b24-3710-462c-893b-c5c18d71eb24","name":"123d1b24-3710-462c-893b-c5c18d71eb24","percentComplete":25,"startTime":"2021-06-22T14:28:52.0125818+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -926,7 +970,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:17:17 GMT + - Tue, 22 Jun 2021 14:29:02 GMT expires: - '-1' pragma: @@ -938,7 +982,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: B4DCFE37D3634558A7761EA03AD72052 Ref B: PDX31EDGE0120 Ref C: 2021-06-04T01:17:17Z' + - 'Ref A: BCE109EFDE9E43D898F72F0430F6716A Ref B: LAX311000110051 Ref C: 2021-06-22T14:29:02Z' status: code: 200 message: OK @@ -958,10 +1002,10 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/123d1b24-3710-462c-893b-c5c18d71eb24?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b","name":"a7c4a7bb-f176-4443-accf-52606e7b907b","percentComplete":0,"startTime":"2021-06-04T01:17:07.6503196+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/123d1b24-3710-462c-893b-c5c18d71eb24","name":"123d1b24-3710-462c-893b-c5c18d71eb24","percentComplete":0,"startTime":"2021-06-22T14:28:52.0125818+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -970,7 +1014,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:17:27 GMT + - Tue, 22 Jun 2021 14:29:12 GMT expires: - '-1' pragma: @@ -982,7 +1026,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: 78AC6270A30643A59315B7EE00F4ED32 Ref B: PDX31EDGE0120 Ref C: 2021-06-04T01:17:28Z' + - 'Ref A: 9FDA367B7D1B4C948C21D37A9229EBCE Ref B: LAX311000110051 Ref C: 2021-06-22T14:29:12Z' status: code: 200 message: OK @@ -1002,10 +1046,10 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/123d1b24-3710-462c-893b-c5c18d71eb24?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b","name":"a7c4a7bb-f176-4443-accf-52606e7b907b","percentComplete":50,"startTime":"2021-06-04T01:17:07.6503196+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/123d1b24-3710-462c-893b-c5c18d71eb24","name":"123d1b24-3710-462c-893b-c5c18d71eb24","percentComplete":50,"startTime":"2021-06-22T14:28:52.0125818+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -1014,7 +1058,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:17:37 GMT + - Tue, 22 Jun 2021 14:29:22 GMT expires: - '-1' pragma: @@ -1026,7 +1070,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: 3B88D8C9502445DD9C31DC7C8051A0DF Ref B: PDX31EDGE0120 Ref C: 2021-06-04T01:17:38Z' + - 'Ref A: 8EC3AF47A7BD4EC9AF2F4C2408D558A9 Ref B: LAX311000110051 Ref C: 2021-06-22T14:29:23Z' status: code: 200 message: OK @@ -1046,10 +1090,10 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/123d1b24-3710-462c-893b-c5c18d71eb24?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b","name":"a7c4a7bb-f176-4443-accf-52606e7b907b","percentComplete":0,"startTime":"2021-06-04T01:17:07.6503196+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/123d1b24-3710-462c-893b-c5c18d71eb24","name":"123d1b24-3710-462c-893b-c5c18d71eb24","percentComplete":0,"startTime":"2021-06-22T14:28:52.0125818+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -1058,7 +1102,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:17:47 GMT + - Tue, 22 Jun 2021 14:29:33 GMT expires: - '-1' pragma: @@ -1070,7 +1114,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: 76FF3B630FB742619DEF746EC05674C4 Ref B: PDX31EDGE0120 Ref C: 2021-06-04T01:17:48Z' + - 'Ref A: ABB32745A3C746A08144792995AEE416 Ref B: LAX311000110051 Ref C: 2021-06-22T14:29:33Z' status: code: 200 message: OK @@ -1090,10 +1134,10 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/123d1b24-3710-462c-893b-c5c18d71eb24?api-version=2021-06-01 response: body: - string: '{"endTime":"2021-06-04T01:17:44.0502741+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/a7c4a7bb-f176-4443-accf-52606e7b907b","name":"a7c4a7bb-f176-4443-accf-52606e7b907b","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Succeeded","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"},"startTime":"2021-06-04T01:17:07.6503196+00:00","status":"Succeeded"}' + string: '{"endTime":"2021-06-22T14:29:31.6168753+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/123d1b24-3710-462c-893b-c5c18d71eb24","name":"123d1b24-3710-462c-893b-c5c18d71eb24","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Succeeded","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"},"startTime":"2021-06-22T14:28:52.0125818+00:00","status":"Succeeded"}' headers: cache-control: - no-cache @@ -1102,7 +1146,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:17:58 GMT + - Tue, 22 Jun 2021 14:29:43 GMT expires: - '-1' pragma: @@ -1114,7 +1158,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: FCD295CCABB24CF5947DC0FE831A34FC Ref B: PDX31EDGE0120 Ref C: 2021-06-04T01:17:58Z' + - 'Ref A: FFBB937CFE1D419AB52C0552288505BE Ref B: LAX311000110051 Ref C: 2021-06-22T14:29:43Z' status: code: 200 message: OK @@ -1134,7 +1178,7 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr?api-version=2021-06-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Succeeded","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"}' @@ -1146,7 +1190,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:17:58 GMT + - Tue, 22 Jun 2021 14:29:43 GMT expires: - '-1' pragma: @@ -1158,7 +1202,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: 2BC0AAE5923846DA91FEB7F7C8B968D1 Ref B: PDX31EDGE0120 Ref C: 2021-06-04T01:17:58Z' + - 'Ref A: 9B0ECE8EDAD348B6991D83D57B7C3701 Ref B: LAX311000110051 Ref C: 2021-06-22T14:29:44Z' status: code: 200 message: OK @@ -1186,7 +1230,7 @@ interactions: x-client-Ver: - 1.2.3 method: GET - uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 response: body: string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' @@ -1202,13 +1246,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:17:58 GMT + - Tue, 22 Jun 2021 14:29:46 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=AoNokgBYlSVBtZKOL8n1xrY; expires=Sun, 04-Jul-2021 01:17:59 GMT; path=/; + - fpc=AgfaJ22iEP5NkbKA6iZ0NOI; expires=Thu, 22-Jul-2021 14:29:47 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrtO1NEQsZnsGnUjYGZw8kluGK-py-Y03C1b1-hgciN2AEVIvUgrDRcJnQB3mXiBlh1QkLBYH4IwsL84LQsknh-MjKLPceJC_JO0DBeHs0MjfoFOHzuP4zSzsSVDUFRoYcwE_8TMFZZMv8ZMqS_AGfG8l4oxZ-PZlNYC-7lMU01jIgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrOl3YBdgvhdVrd7Ih7brdSnokzoaTIuwI90l452onQpKMyeITWjkCvy30i4mh3hPPJNdgHn5l-aorC4fqLga4WXxNj_QyFBhBdU47DSrsdA8pOX4v40s4sB0pQ-bSI3X5TV46ZdUAeoCGh4lsHw5nOqcYtVJzcbRbw9vpMpU7PPkgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -1217,7 +1261,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11722.21 - EUS ProdSlices + - 2.1.11829.8 - EUS ProdSlices status: code: 200 message: OK @@ -1237,7 +1281,7 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons?api-version=2021-06-01 response: body: string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Succeeded","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"}]}' @@ -1249,7 +1293,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:17:59 GMT + - Tue, 22 Jun 2021 14:29:49 GMT expires: - '-1' pragma: @@ -1261,7 +1305,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: 05BD151FA6764AA784FE3DCC8F8E1D3D Ref B: PDX31EDGE0111 Ref C: 2021-06-04T01:17:59Z' + - 'Ref A: 9828FF9CFECB41E199BCF6607C263D9B Ref B: LAXEDGE1507 Ref C: 2021-06-22T14:29:49Z' status: code: 200 message: OK @@ -1289,7 +1333,7 @@ interactions: x-client-Ver: - 1.2.3 method: GET - uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 response: body: string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' @@ -1305,13 +1349,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:18:00 GMT + - Tue, 22 Jun 2021 14:29:53 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=AshtVrOo-1ZDjzlDEtDFg78; expires=Sun, 04-Jul-2021 01:18:00 GMT; path=/; + - fpc=AlBToC54zCBAomzQqCjRNbE; expires=Thu, 22-Jul-2021 14:29:53 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrXEESoVLh9tborC-5jO0qjlQmRHg0Id2nDz61j8LIfTsGbZ2bbWh2kUpX6qxyNVaeT5-tn3YFsdP1sIQVxWUwNE63mwkcZaUt1Cz5XMQWyT61uU9pvmeUVUlLl7QHcYNbjbrK5mF4VzJqgTwQbo8jbVXOtGNy5cf8AVGZfP2WOdUgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrE9IEfC9c5n68PM2m-rrgTaHPN8DMy8NwVN1lKRmXmOmvFKju7pxEs90WhwnDZgNOTvXUeQVR_h0aEDykW2BUHQ8oxtsyeqkEprHx-UNokTz-TvwFVyQkvlihmPc-TwMrQZpwLqoFaazj4xjd7WNc2RJv5If1zZZNU7pvqMt1FNggAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -1320,7 +1364,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11722.21 - SCUS ProdSlices + - 2.1.11829.8 - EUS ProdSlices status: code: 200 message: OK @@ -1340,7 +1384,7 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr?api-version=2021-06-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Succeeded","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"}' @@ -1352,7 +1396,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:18:00 GMT + - Tue, 22 Jun 2021 14:29:54 GMT expires: - '-1' pragma: @@ -1364,7 +1408,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: 262EFE2448474AFF86CF1CD2C54D6480 Ref B: PDX31EDGE0111 Ref C: 2021-06-04T01:18:00Z' + - 'Ref A: F15D58C3DDF74D5DAE783F20094353F4 Ref B: LAXEDGE1618 Ref C: 2021-06-22T14:29:55Z' status: code: 200 message: OK @@ -1392,7 +1436,7 @@ interactions: x-client-Ver: - 1.2.3 method: GET - uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 response: body: string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' @@ -1408,13 +1452,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:18:00 GMT + - Tue, 22 Jun 2021 14:29:58 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=AhTm7fQbUAdEuhVbK8xP1qs; expires=Sun, 04-Jul-2021 01:18:00 GMT; path=/; + - fpc=AgT2xr0DooJOuUqD8Nxc0vA; expires=Thu, 22-Jul-2021 14:29:58 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrOiiFQPf4_nciCCIipWyZSUZsjIm0atKnhF23cvHRrK_NEHzHFwvl8VcnvFlrV7ev4T0hWRQjiBhzGuR3a_7iB-yJY_Wucc2c-oEjaaX3uQu4EydAcOgj7VgN6ii5IanLi3QxsVLGqMjhob9Z5frRImc6g8hePviNGqTqfGx3InYgAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrBGwJxnKZPFmyTkbbrt5uCn3iVFx4bN2o9FXNCDi1IxDUtumYL3gYpeSOwOpo14ahInuENttuogKKME6cvyG8aQ_dpC4FurWe3XsJ2fjyvTk7T-ScDOFsa1DcSdJVO4nDe7P6qhHOuBp549PMZWlX7HE8-u_YXAsy699_sO0khmIgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -1423,7 +1467,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11722.26 - EUS ProdSlices + - 2.1.11829.4 - NCUS ProdSlices status: code: 200 message: OK @@ -1445,13 +1489,13 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr?api-version=2021-06-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Deleting","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"}' headers: azure-asyncoperation: - - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92?api-version=2021-06-01 + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/d4c93e9e-4431-4241-b0b2-2b7a41f751cb?api-version=2021-06-01 cache-control: - no-cache content-length: @@ -1459,11 +1503,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:18:00 GMT + - Tue, 22 Jun 2021 14:30:01 GMT expires: - '-1' location: - - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationresults/98235272-1944-43ca-b45c-bebd59b1bd92?api-version=2021-06-01 + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationresults/d4c93e9e-4431-4241-b0b2-2b7a41f751cb?api-version=2021-06-01 pragma: - no-cache strict-transport-security: @@ -1473,9 +1517,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14997' + - '14999' x-msedge-ref: - - 'Ref A: CD5B5BFA6D4D444DB2D34BC3C02F1B2F Ref B: PDX31EDGE0121 Ref C: 2021-06-04T01:18:00Z' + - 'Ref A: CBC3AD7151644D6F80017624035585B2 Ref B: LAXEDGE1720 Ref C: 2021-06-22T14:30:00Z' status: code: 202 message: Accepted @@ -1495,10 +1539,10 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/d4c93e9e-4431-4241-b0b2-2b7a41f751cb?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92","name":"98235272-1944-43ca-b45c-bebd59b1bd92","percentComplete":0,"startTime":"2021-06-04T01:18:01.1326769+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/d4c93e9e-4431-4241-b0b2-2b7a41f751cb","name":"d4c93e9e-4431-4241-b0b2-2b7a41f751cb","percentComplete":0,"startTime":"2021-06-22T14:30:01.2766941+00:00","status":"Building"}' headers: cache-control: - no-cache @@ -1507,7 +1551,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:18:11 GMT + - Tue, 22 Jun 2021 14:30:11 GMT expires: - '-1' pragma: @@ -1519,7 +1563,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: BC592D98F6C240B68C12F83D5DD1EEFB Ref B: PDX31EDGE0121 Ref C: 2021-06-04T01:18:11Z' + - 'Ref A: 95FD424F2F6D42158F179519BAEE41B3 Ref B: LAXEDGE1720 Ref C: 2021-06-22T14:30:11Z' status: code: 200 message: OK @@ -1539,19 +1583,19 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/d4c93e9e-4431-4241-b0b2-2b7a41f751cb?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92","name":"98235272-1944-43ca-b45c-bebd59b1bd92","percentComplete":0,"startTime":"2021-06-04T01:18:01.1326769+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/d4c93e9e-4431-4241-b0b2-2b7a41f751cb","name":"d4c93e9e-4431-4241-b0b2-2b7a41f751cb","percentComplete":50,"startTime":"2021-06-22T14:30:01.2766941+00:00","status":"Building"}' headers: cache-control: - no-cache content-length: - - '397' + - '398' content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:18:21 GMT + - Tue, 22 Jun 2021 14:30:21 GMT expires: - '-1' pragma: @@ -1563,7 +1607,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: 32387C5DA5874D67A93A1560C208C400 Ref B: PDX31EDGE0121 Ref C: 2021-06-04T01:18:21Z' + - 'Ref A: 110EA0F27F5C4599A543E1F545C87FCE Ref B: LAXEDGE1720 Ref C: 2021-06-22T14:30:21Z' status: code: 200 message: OK @@ -1583,19 +1627,19 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/d4c93e9e-4431-4241-b0b2-2b7a41f751cb?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92","name":"98235272-1944-43ca-b45c-bebd59b1bd92","percentComplete":50,"startTime":"2021-06-04T01:18:01.1326769+00:00","status":"Building"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/d4c93e9e-4431-4241-b0b2-2b7a41f751cb","name":"d4c93e9e-4431-4241-b0b2-2b7a41f751cb","percentComplete":0,"startTime":"2021-06-22T14:30:01.2766941+00:00","status":"Building"}' headers: cache-control: - no-cache content-length: - - '398' + - '397' content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:18:31 GMT + - Tue, 22 Jun 2021 14:30:31 GMT expires: - '-1' pragma: @@ -1607,7 +1651,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: A8F32D41E935423FB28F701155BED24E Ref B: PDX31EDGE0121 Ref C: 2021-06-04T01:18:31Z' + - 'Ref A: 9BB43327D17241C9B365CDB3A139E4E8 Ref B: LAXEDGE1720 Ref C: 2021-06-22T14:30:31Z' status: code: 200 message: OK @@ -1627,19 +1671,19 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/d4c93e9e-4431-4241-b0b2-2b7a41f751cb?api-version=2021-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92","name":"98235272-1944-43ca-b45c-bebd59b1bd92","percentComplete":0,"startTime":"2021-06-04T01:18:01.1326769+00:00","status":"Building"}' + string: '{"endTime":"2021-06-22T14:30:36.6323601+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/d4c93e9e-4431-4241-b0b2-2b7a41f751cb","name":"d4c93e9e-4431-4241-b0b2-2b7a41f751cb","percentComplete":100,"startTime":"2021-06-22T14:30:01.2766941+00:00","status":"Succeeded"}' headers: cache-control: - no-cache content-length: - - '397' + - '446' content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:18:41 GMT + - Tue, 22 Jun 2021 14:30:41 GMT expires: - '-1' pragma: @@ -1651,7 +1695,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: 96815CAAF5134036B032510D806728BD Ref B: PDX31EDGE0121 Ref C: 2021-06-04T01:18:41Z' + - 'Ref A: E34ABF10EA434E7CBBFEF3DEB3C58ED9 Ref B: LAXEDGE1720 Ref C: 2021-06-22T14:30:42Z' status: code: 200 message: OK @@ -1660,10 +1704,69 @@ interactions: headers: Accept: - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:30:45 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AmvJHgBrni5FlS9BT7ekDhI; expires=Thu, 22-Jul-2021 14:30:45 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevrv6HHhjcADrhe9wwy1JGdD7lU6VX_FkBIaOs8eRotzIYwx3tABu9CLI1DrhxoxwGH6RknPadDMITsoz5DDliCo-vGi9nswpABU03_ZxB9lVhNLNp_gIOgv_Gdp9XC7WNFSzUcaTsZ50kEFoR1yMaXmEqr4MilMDuy8u3_3skZpF4gAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11829.8 - SCUS ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json Accept-Encoding: - gzip, deflate CommandName: - - vmware addon vr delete + - vmware addon list Connection: - keep-alive ParameterSetName: @@ -1671,19 +1774,931 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons?api-version=2021-06-01 response: body: - string: '{"endTime":"2021-06-04T01:18:39.0494200+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/vr/operationstatuses/98235272-1944-43ca-b45c-bebd59b1bd92","name":"98235272-1944-43ca-b45c-bebd59b1bd92","percentComplete":100,"startTime":"2021-06-04T01:18:01.1326769+00:00","status":"Succeeded"}' + string: '{"value":[]}' headers: cache-control: - no-cache content-length: - - '446' + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:30:47 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: E6789D34B71442FCAA2C85AF54327B55 Ref B: LAX311000110019 Ref C: 2021-06-22T14:30:47Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:30:50 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AnncqloWeppBgJvMAgcU4l0; expires=Thu, 22-Jul-2021 14:30:51 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr9Bj-QUqG_4BQlD9h5zbI3BVw52nMztk7SFeYFTuMV_VM4SxH6wdUWbznhAyGpczJnkS7Ut539FF0qHKBlI4fIQWrN6cmUuvwp67SCFcLOCz2jWKhzTAgReYU62bPp05CeDMAWN7HI0RPC1j9NWBBn43Rt4MoWv97WnQZdDoayNcgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11829.4 - NCUS ProdSlices + status: + code: 200 + message: OK +- request: + body: '{"properties": {"addonType": "SRM", "licenseKey": "41915-178A8-FF4A4-DB683-6D735"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon srm create + Connection: + - keep-alive + Content-Length: + - '83' + Content-Type: + - application/json + ParameterSetName: + - -g -c --license-key + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm","name":"srm","properties":{"addonType":"SRM","licenseKey":"41915-178A8-FF4A4-DB683-6D735","provisioningState":"Building"},"type":"Microsoft.AVS/privateClouds/addons"}' + headers: + azure-asyncoperation: + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/80af6ca5-35e9-4183-bfb9-55f1aa36e0ba?api-version=2021-06-01 + cache-control: + - no-cache + content-length: + - '375' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:30:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-msedge-ref: + - 'Ref A: 7A1F0606A7BE49FEA0A9216F70B8DD1D Ref B: LAXEDGE1611 Ref C: 2021-06-22T14:30:53Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon srm create + Connection: + - keep-alive + ParameterSetName: + - -g -c --license-key + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/80af6ca5-35e9-4183-bfb9-55f1aa36e0ba?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/80af6ca5-35e9-4183-bfb9-55f1aa36e0ba","name":"80af6ca5-35e9-4183-bfb9-55f1aa36e0ba","percentComplete":25,"startTime":"2021-06-22T14:30:54.0388632+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '399' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:31:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: E26311E7E1A54F1C84C685FC552B82F9 Ref B: LAXEDGE1611 Ref C: 2021-06-22T14:31:04Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon srm create + Connection: + - keep-alive + ParameterSetName: + - -g -c --license-key + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/80af6ca5-35e9-4183-bfb9-55f1aa36e0ba?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/80af6ca5-35e9-4183-bfb9-55f1aa36e0ba","name":"80af6ca5-35e9-4183-bfb9-55f1aa36e0ba","percentComplete":0,"startTime":"2021-06-22T14:30:54.0388632+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '398' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:31:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 88C5A67627BE4C65AF9FAF79706062E7 Ref B: LAXEDGE1611 Ref C: 2021-06-22T14:31:14Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon srm create + Connection: + - keep-alive + ParameterSetName: + - -g -c --license-key + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/80af6ca5-35e9-4183-bfb9-55f1aa36e0ba?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/80af6ca5-35e9-4183-bfb9-55f1aa36e0ba","name":"80af6ca5-35e9-4183-bfb9-55f1aa36e0ba","percentComplete":50,"startTime":"2021-06-22T14:30:54.0388632+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '399' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:31:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: D2B90998F676405E94843F0E610FCF0E Ref B: LAXEDGE1611 Ref C: 2021-06-22T14:31:25Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon srm create + Connection: + - keep-alive + ParameterSetName: + - -g -c --license-key + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/80af6ca5-35e9-4183-bfb9-55f1aa36e0ba?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/80af6ca5-35e9-4183-bfb9-55f1aa36e0ba","name":"80af6ca5-35e9-4183-bfb9-55f1aa36e0ba","percentComplete":75,"startTime":"2021-06-22T14:30:54.0388632+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '399' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:31:34 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: A7B1B63FFADC43E6A2E32938B7A0B71C Ref B: LAXEDGE1611 Ref C: 2021-06-22T14:31:35Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon srm create + Connection: + - keep-alive + ParameterSetName: + - -g -c --license-key + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/80af6ca5-35e9-4183-bfb9-55f1aa36e0ba?api-version=2021-06-01 + response: + body: + string: '{"endTime":"2021-06-22T14:31:31.6176814+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/80af6ca5-35e9-4183-bfb9-55f1aa36e0ba","name":"80af6ca5-35e9-4183-bfb9-55f1aa36e0ba","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm","name":"srm","properties":{"addonType":"SRM","licenseKey":"41915-178A8-FF4A4-DB683-6D735","provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/addons"},"startTime":"2021-06-22T14:30:54.0388632+00:00","status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '837' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:31:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: A911C66370EE4A4C95DB85EC3D257345 Ref B: LAXEDGE1611 Ref C: 2021-06-22T14:31:45Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon srm create + Connection: + - keep-alive + ParameterSetName: + - -g -c --license-key + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm","name":"srm","properties":{"addonType":"SRM","licenseKey":"41915-178A8-FF4A4-DB683-6D735","provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/addons"}' + headers: + cache-control: + - no-cache + content-length: + - '376' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:31:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 86613A99A70D4C57A2FDB507223C7080 Ref B: LAXEDGE1611 Ref C: 2021-06-22T14:31:45Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:31:48 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AtLwp-vYI4pEsIXd5O9xGYA; expires=Thu, 22-Jul-2021 14:31:49 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrFok1ZQiPwrZBnqqHKXJQEtc5QQGXGHyBf-CsmHj-veBegKwH1m0-GBE9TbfQzQ3JZv4PMwIUfLaO_S1YKT1Bv1oB2TvSKnbBL89STwhVTZ0zZLeo-gkwfXM2YrVORmFJ81EGo2Fv7uR6lP9vZoq6Mq2_jYJq4us8S1w_TQL2_Q4gAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11829.4 - NCUS ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon list + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons?api-version=2021-06-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm","name":"srm","properties":{"addonType":"SRM","licenseKey":"41915-178A8-FF4A4-DB683-6D735","provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/addons"}]}' + headers: + cache-control: + - no-cache + content-length: + - '388' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:31:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 2A64509D01B341E7AB0A1C324CEE9521 Ref B: LAX311000112029 Ref C: 2021-06-22T14:31:51Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:31:54 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AmsjMx6JVkZNmmN7FZAyLAo; expires=Thu, 22-Jul-2021 14:31:54 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrcwYZN93qx-wvMu3n0bCWotKtFaJPuuErJb67hn7heC54wk-tnENlDxkKwaiQavyCWyBR4_ixIa9pjKNwLT2EBOECLID3MzTk9mBtxv12UpfP6xQ4psQv0_vIp0-ohJ6MtOzIh7m5RbmueT5yvn5Web0X9OE8FuzlVxs_mMgrVwAgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11829.4 - WUS2 ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon srm show + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm","name":"srm","properties":{"addonType":"SRM","licenseKey":"41915-178A8-FF4A4-DB683-6D735","provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/addons"}' + headers: + cache-control: + - no-cache + content-length: + - '376' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:31:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: C5CE4366459340FB9DA8805EABC6DAD9 Ref B: LAX311000111049 Ref C: 2021-06-22T14:31:57Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:32:00 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AsGfmW9-zbdDhS2YjzbD0kA; expires=Thu, 22-Jul-2021 14:32:00 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr5jE_AzsmbYxzITjVD5BLzj5rj-Rdr6wIZVVpYYLVmGfA-Tvi6SA-Vc3hU6drgd7XGcpuSE3uuZSFiv23eGwYOSYxAQGUb0IEHAbBBrsLhqfPYx-FX9ZOCCWd83CZH1yK9nZ9DzJuPwtQ7kmyqwE7yVREA5Ody2S5FifTZU5gJvggAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11829.8 - WUS2 ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon srm delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm","name":"srm","properties":{"addonType":"SRM","licenseKey":"41915-178A8-FF4A4-DB683-6D735","provisioningState":"Deleting"},"type":"Microsoft.AVS/privateClouds/addons"}' + headers: + azure-asyncoperation: + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/f90bcbce-e2c6-40ab-bc62-f4414eca8a05?api-version=2021-06-01 + cache-control: + - no-cache + content-length: + - '375' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:32:03 GMT + expires: + - '-1' + location: + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationresults/f90bcbce-e2c6-40ab-bc62-f4414eca8a05?api-version=2021-06-01 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + x-msedge-ref: + - 'Ref A: 0B3D19E213B1469E8E70636E8C402BA0 Ref B: LAX311000112021 Ref C: 2021-06-22T14:32:02Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon srm delete + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/f90bcbce-e2c6-40ab-bc62-f4414eca8a05?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/f90bcbce-e2c6-40ab-bc62-f4414eca8a05","name":"f90bcbce-e2c6-40ab-bc62-f4414eca8a05","percentComplete":0,"startTime":"2021-06-22T14:32:02.9951519+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '398' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:32:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 6170F1BCD55C45618D1DF6FEE57ACEB7 Ref B: LAX311000112021 Ref C: 2021-06-22T14:32:13Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon srm delete + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/f90bcbce-e2c6-40ab-bc62-f4414eca8a05?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/f90bcbce-e2c6-40ab-bc62-f4414eca8a05","name":"f90bcbce-e2c6-40ab-bc62-f4414eca8a05","percentComplete":25,"startTime":"2021-06-22T14:32:02.9951519+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '399' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:32:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: B30520955E714512A5012B474D643B8A Ref B: LAX311000112021 Ref C: 2021-06-22T14:32:23Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon srm delete + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/f90bcbce-e2c6-40ab-bc62-f4414eca8a05?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/f90bcbce-e2c6-40ab-bc62-f4414eca8a05","name":"f90bcbce-e2c6-40ab-bc62-f4414eca8a05","percentComplete":50,"startTime":"2021-06-22T14:32:02.9951519+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '399' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:32:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: F8C8912CD59C4F6C94A1794BBE285561 Ref B: LAX311000112021 Ref C: 2021-06-22T14:32:33Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon srm delete + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/f90bcbce-e2c6-40ab-bc62-f4414eca8a05?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/f90bcbce-e2c6-40ab-bc62-f4414eca8a05","name":"f90bcbce-e2c6-40ab-bc62-f4414eca8a05","percentComplete":75,"startTime":"2021-06-22T14:32:02.9951519+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '399' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 14:32:43 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: C6EA54D9F9CB45789C6B1462AD29FF08 Ref B: LAX311000112021 Ref C: 2021-06-22T14:32:43Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon srm delete + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/f90bcbce-e2c6-40ab-bc62-f4414eca8a05?api-version=2021-06-01 + response: + body: + string: '{"endTime":"2021-06-22T14:32:41.6261102+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons/srm/operationstatuses/f90bcbce-e2c6-40ab-bc62-f4414eca8a05","name":"f90bcbce-e2c6-40ab-bc62-f4414eca8a05","percentComplete":100,"startTime":"2021-06-22T14:32:02.9951519+00:00","status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '447' content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:18:51 GMT + - Tue, 22 Jun 2021 14:32:54 GMT expires: - '-1' pragma: @@ -1695,7 +2710,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: D52AC86943324364834495C971CCCC37 Ref B: PDX31EDGE0121 Ref C: 2021-06-04T01:18:52Z' + - 'Ref A: 1D47AE1FF58B487F8434607CEB69F1C7 Ref B: LAX311000112021 Ref C: 2021-06-22T14:32:54Z' status: code: 200 message: OK @@ -1723,7 +2738,7 @@ interactions: x-client-Ver: - 1.2.3 method: GET - uri: https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 response: body: string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' @@ -1739,13 +2754,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:18:52 GMT + - Tue, 22 Jun 2021 14:32:56 GMT p3p: - CP="DSP CUR OTPi IND OTRi ONL FIN" set-cookie: - - fpc=Aonec9VPQYFMiOT1xefOtek; expires=Sun, 04-Jul-2021 01:18:52 GMT; path=/; + - fpc=Atuqkns_aExAqz8bV79FoVU; expires=Thu, 22-Jul-2021 14:32:57 GMT; path=/; secure; HttpOnly; SameSite=None - - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrJ5x1-VgS2KVYhm90pYVRX-JClvzgjcDE0RlN9_t5XwlrZIWYTXo9hE7fP5V3l4n6NkFkDky2K615sdL4QSlz18p5gOWkgRpB3UXmqOjC4DkuEWw8AVIkWPjKEq4klQWHKP862Fep7c17QQxxcm5awRSWsuFN9ee9jE1NiSnz6XogAA; + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrGv47Y-341-ZeQRxTCXSDzXojrt27RGYU6gFqw7D4uQ_JkFqqF6_S7-zpiKYKYT-6xl7qfIUOXC9NvyLFRYyoWb18NXtICDniRw5Jm9QnG5lKwIl0VmwBKCPWeTkk4CUUHCvcDiHCYQX9aGpt0vAmdimhCRmWiTq7uTNuXRLCEOUgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly @@ -1754,7 +2769,7 @@ interactions: x-content-type-options: - nosniff x-ms-ests-server: - - 2.1.11722.26 - EUS ProdSlices + - 2.1.11829.4 - NCUS ProdSlices status: code: 200 message: OK @@ -1774,7 +2789,7 @@ interactions: User-Agent: - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) method: GET - uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons?api-version=2021-06-01 + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_addon000001/providers/Microsoft.AVS/privateClouds/mycloud1/addons?api-version=2021-06-01 response: body: string: '{"value":[]}' @@ -1786,7 +2801,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 04 Jun 2021 01:18:53 GMT + - Tue, 22 Jun 2021 14:32:59 GMT expires: - '-1' pragma: @@ -1798,7 +2813,7 @@ interactions: x-content-type-options: - nosniff x-msedge-ref: - - 'Ref A: E42B1FCEA4FA4BDEB76E1571C3D351F0 Ref B: PDX31EDGE0111 Ref C: 2021-06-04T01:18:53Z' + - 'Ref A: 80619451795648878D8A23D5320333E3 Ref B: LAX311000113047 Ref C: 2021-06-22T14:32:59Z' status: code: 200 message: OK diff --git a/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_global_reach_connection.yaml b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_global_reach_connection.yaml new file mode 100644 index 00000000000..bcb4b930092 --- /dev/null +++ b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_global_reach_connection.yaml @@ -0,0 +1,1375 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:30:59 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AggNfcJuW3tOiJxsBRpkSYI; expires=Fri, 16-Jul-2021 18:30:59 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevriAnXvQ6vUu3Ms5jQYOeu8h_t65xEb_4IMH73ZPCXAiMdIhrBF7EbXq-fx433AolA-khFE1oscCXCDeumXk2HsRK7tSkXg2Um-plbzNdcFiHMK4TT2dZ27aztoIFPzB3YWy0HpDBUo6TwtG4PFIKuyXRuJ-ZxCSLjeMnJz-kmRwwgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11787.15 - EUS ProdSlices + status: + code: 200 + message: OK +- request: + body: '{"location": "westcentralus", "tags": {}, "sku": {"name": "av20"}, "properties": + {"managementCluster": {"clusterSize": 4}, "internet": "Disabled", "networkBlock": + "192.168.48.0/22", "vcenterPassword": "UpfBXae9ZquZSDXk(", "nsxtPassword": "5rqdLj4GF3cePUe6("}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + Content-Length: + - '259' + Content-Type: + - application/json + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"westcentralus","name":"cloud1","properties":{"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost32.mp01.mock01.vmcp.vs.management","gp-fakehost31.mp01.mock01.vmcp.vs.management","gp-fakehost35.mp01.mock01.vmcp.vs.management","gp-fakehost33.mp01.mock01.vmcp.vs.management"],"provisioningState":"Building"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","provisioningNetwork":"192.168.50.0/25","provisioningState":"Building","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + azure-asyncoperation: + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef?api-version=2021-06-01 + cache-control: + - no-cache + content-length: + - '975' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:31:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-msedge-ref: + - 'Ref A: A48C421106D744FDBA74C2B83DA1AE66 Ref B: LAXEDGE1414 Ref C: 2021-06-16T18:31:02Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef","name":"a3970561-6113-45e9-80d3-36c4f8b70cef","percentComplete":0,"startTime":"2021-06-16T18:31:04.9031706+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '385' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:31:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: A7F5055826E848CC89D63DABF7F730C5 Ref B: LAXEDGE1414 Ref C: 2021-06-16T18:31:18Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef","name":"a3970561-6113-45e9-80d3-36c4f8b70cef","percentComplete":0,"startTime":"2021-06-16T18:31:04.9031706+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '385' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:31:28 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 5A2DF10B42C44F6195236E3A4DCC1C90 Ref B: LAXEDGE1414 Ref C: 2021-06-16T18:31:28Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef","name":"a3970561-6113-45e9-80d3-36c4f8b70cef","percentComplete":88.75,"startTime":"2021-06-16T18:31:04.9031706+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '389' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:31:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 9A71AB1BF5C2492ABDBB0348E5FFD5E0 Ref B: LAXEDGE1414 Ref C: 2021-06-16T18:31:38Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef","name":"a3970561-6113-45e9-80d3-36c4f8b70cef","percentComplete":88.75,"startTime":"2021-06-16T18:31:04.9031706+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '389' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:31:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: D513923D84424D05B0032411BB6ABC88 Ref B: LAXEDGE1414 Ref C: 2021-06-16T18:31:50Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef","name":"a3970561-6113-45e9-80d3-36c4f8b70cef","percentComplete":88.75,"startTime":"2021-06-16T18:31:04.9031706+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '389' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:31:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: B8A1E952D01D49879789145F75E0C129 Ref B: LAXEDGE1414 Ref C: 2021-06-16T18:32:00Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef","name":"a3970561-6113-45e9-80d3-36c4f8b70cef","percentComplete":100,"startTime":"2021-06-16T18:31:04.9031706+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:32:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 84C4A64855EC474186ABCD0875CC2273 Ref B: LAXEDGE1414 Ref C: 2021-06-16T18:32:10Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef","name":"a3970561-6113-45e9-80d3-36c4f8b70cef","percentComplete":100,"startTime":"2021-06-16T18:31:04.9031706+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:32:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 2E594EDAC923487EB2E5C9EE3C86A857 Ref B: LAXEDGE1414 Ref C: 2021-06-16T18:32:21Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef","name":"a3970561-6113-45e9-80d3-36c4f8b70cef","percentComplete":100,"startTime":"2021-06-16T18:31:04.9031706+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:32:30 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: D90EC2FF56D54E90A18D63F39E316C94 Ref B: LAXEDGE1414 Ref C: 2021-06-16T18:32:31Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef","name":"a3970561-6113-45e9-80d3-36c4f8b70cef","percentComplete":100,"startTime":"2021-06-16T18:31:04.9031706+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:32:41 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 8701EDBA01F04A3BA737D1F08B3FD6C0 Ref B: LAXEDGE1414 Ref C: 2021-06-16T18:32:41Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef","name":"a3970561-6113-45e9-80d3-36c4f8b70cef","percentComplete":100,"startTime":"2021-06-16T18:31:04.9031706+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:32:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 01C3BB0A447B4E549629883EDFCBB3FC Ref B: LAXEDGE1414 Ref C: 2021-06-16T18:32:52Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef","name":"a3970561-6113-45e9-80d3-36c4f8b70cef","percentComplete":100,"startTime":"2021-06-16T18:31:04.9031706+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:33:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: A9115CA3A4F14E3AB91D85EDAC99C0BC Ref B: LAXEDGE1414 Ref C: 2021-06-16T18:33:02Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef","name":"a3970561-6113-45e9-80d3-36c4f8b70cef","percentComplete":100,"startTime":"2021-06-16T18:31:04.9031706+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:33:11 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: DDD84377BB76445F8AAC3A2CA47F6CB5 Ref B: LAXEDGE1414 Ref C: 2021-06-16T18:33:12Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef?api-version=2021-06-01 + response: + body: + string: '{"endTime":"2021-06-16T18:33:17.6247815+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/a3970561-6113-45e9-80d3-36c4f8b70cef","name":"a3970561-6113-45e9-80d3-36c4f8b70cef","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"westcentralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt38-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt38-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt38-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt38-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost32.mp01.mock01.vmcp.vs.management","gp-fakehost31.mp01.mock01.vmcp.vs.management","gp-fakehost35.mp01.mock01.vmcp.vs.management","gp-fakehost33.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2021-06-16T18:31:04.9031706+00:00","status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '2067' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:33:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 7C13D211D3BB40F9A4308A9136E7723A Ref B: LAXEDGE1414 Ref C: 2021-06-16T18:33:22Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1","location":"westcentralus","name":"cloud1","properties":{"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt38-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt38-cust-mp01-mock01-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt38-cust-mp01-mock01/providers/Microsoft.Network/expressRouteCircuits/tnt38-cust-mp01-mock01-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["gp-fakehost32.mp01.mock01.vmcp.vs.management","gp-fakehost31.mp01.mock01.vmcp.vs.management","gp-fakehost35.mp01.mock01.vmcp.vs.management","gp-fakehost33.mp01.mock01.vmcp.vs.management"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxtCertificateThumbprint":"B9A9474616752565A3FAF23E0A013ECE3DC8B8FF","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"BE8EA855AA13D9662A115571636B9B1925C6DB68","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av20"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + cache-control: + - no-cache + content-length: + - '1619' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:33:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 22021F46B3334A2BAA1AF96537D01351 Ref B: LAXEDGE1414 Ref C: 2021-06-16T18:33:23Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:33:25 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=An35iydOw-1LloiYBalnmAI; expires=Fri, 16-Jul-2021 18:33:26 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr_vrnxMBtaeFjr-Ht_9jFZ6pHW2I4qCmotPnAfjGN6CrgJCTM2U5UTRPI1sEdSuCWi_jN6tae2uRLgkZGDrWiW28T96Ee57oXA5ZimwXlvI3xJ9F_bxRQIip8Jr2fkwnypXXWKwfE5gq-rcCy1TnQpRpZ7DnmP2_jPGLDE5sKjQogAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11829.4 - WUS2 ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware global-reach-connection list + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/globalReachConnections?api-version=2021-06-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:33:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 5DD6EED41276432FA4C7ED7B9A4BA1A5 Ref B: LAXEDGE1313 Ref C: 2021-06-16T18:33:29Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:33:32 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=Av0lksS2butIkMfRSiyWHtY; expires=Fri, 16-Jul-2021 18:33:32 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevryDCxNBU4JwAYX2vzxpCFH5mTR5SA6XPJnx9mTKUKzzPpjP684jOue7hkpZI9yRptZfBE9yKCq3hLAS3eXofry7b-Q974Vtjh7HLrc9CF5VeSEfQjUVqtyr1f0K6g2clUMFe4GX5Lj4zTHiwLSfRStYaP4QiAFQyXqx8Eciwc7ysgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11787.15 - SCUS ProdSlices + status: + code: 200 + message: OK +- request: + body: '{"properties": {"authorizationKey": "01010101-0101-0101-0101-010101010101", + "peerExpressRouteCircuit": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware global-reach-connection create + Connection: + - keep-alive + Content-Length: + - '237' + Content-Type: + - application/json + ParameterSetName: + - -g -c -n --peer-express-route-circuit --authorization-key + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/globalReachConnections/connection1?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/globalReachConnections/connection1","name":"connection1","properties":{"addressPrefix":"192.168.48.128/29","authorizationKey":"01010101-0101-0101-0101-010101010101","circuitConnectionStatus":"Connected","peerExpressRouteCircuit":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer","provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/globalReachConnections"}' + headers: + cache-control: + - no-cache + content-length: + - '650' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:33:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + x-msedge-ref: + - 'Ref A: A3B484C50C994CEB9C8F1102B2CB5B8B Ref B: LAX311000110045 Ref C: 2021-06-16T18:33:34Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:33:40 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AoD69EGLOwdAkNMeXxYy8yY; expires=Fri, 16-Jul-2021 18:33:41 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrPDz5PcwspIuNlYuBaKH_CXEuTn3wPEruQ413C1dgmrsBHupq9jK5JnNdAYsgeiiSeTic7gU3Inizx1rN4r8DF_DzQMNVuIflShlJTchSmVEVUvjJAxRnIIjzz28nzxsdhl9nmOtt35IQ2p3qlZPQNt5TgX9rvh-AX67Nlpy9jNkgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11829.4 - SCUS ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware global-reach-connection list + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/globalReachConnections?api-version=2021-06-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/globalReachConnections/connection1","name":"connection1","properties":{"addressPrefix":"192.168.48.128/29","authorizationKey":"01010101-0101-0101-0101-010101010101","circuitConnectionStatus":"Connected","peerExpressRouteCircuit":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer","provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/globalReachConnections"}]}' + headers: + cache-control: + - no-cache + content-length: + - '662' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:33:43 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 23D03EA98A8D40B1AED7DAB0753462A2 Ref B: LAXEDGE1507 Ref C: 2021-06-16T18:33:43Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:33:46 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AiufH1Q4TlhGjS0FnHO-ZYg; expires=Fri, 16-Jul-2021 18:33:46 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrrcsJRZTy3qrlfoGI45CMppcI0X-HiDZMpuaf4Xz65N8g3a3ufFwQnK2aDVK7UTmApxHr7UJ1o3TuswUVS1L__hGidZztrUvTWLxLtK-BV8zanyZ0WadU14lUF2g3lVXng3-vbMkvNJwHfh6kV9wjxd9wHlgGx2sxHvFeWObpIHkgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11829.4 - WUS2 ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware global-reach-connection show + Connection: + - keep-alive + ParameterSetName: + - -g -c -n + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/globalReachConnections/connection1?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/globalReachConnections/connection1","name":"connection1","properties":{"addressPrefix":"192.168.48.128/29","authorizationKey":"01010101-0101-0101-0101-010101010101","circuitConnectionStatus":"Connected","peerExpressRouteCircuit":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer","provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/globalReachConnections"}' + headers: + cache-control: + - no-cache + content-length: + - '650' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:33:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: D4382A82F88C4CF690BD79E31A74BE92 Ref B: LAXEDGE0908 Ref C: 2021-06-16T18:33:49Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:33:51 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=AnPvMCpPyopNuILmsAR3bQ4; expires=Fri, 16-Jul-2021 18:33:52 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrKaaUnwWkEc_kvfbR7irS4PMZ--7SSeXfsREXazVM4LW7C6BxZvS34Enqabo0TZQcH0Lm58D5ZGRxXY8ODyIu4k_6jrj-YKNVjlO9L5CLYGPb_UVbE1ABmXja93pT6TaNsPuPzEkzRSsAOpTyeNf1kJSNqihYa3GLPMNtXL_gGE8gAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11829.4 - EUS ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware global-reach-connection delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -c -n + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/globalReachConnections/connection1?api-version=2021-06-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + content-type: + - text/html + date: + - Wed, 16 Jun 2021 18:33:55 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + x-msedge-ref: + - 'Ref A: 254CEE8C24944AADA685055E1D02BA56 Ref B: LAXEDGE0807 Ref C: 2021-06-16T18:33:54Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Charset: + - utf-8 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + return-client-request-id: + - 'true' + x-client-CPU: + - x64 + x-client-OS: + - win32 + x-client-SKU: + - Python + x-client-Ver: + - 1.2.3 + method: GET + uri: https://localhost:8866/common/discovery/instance?authorization_endpoint=https%3A%2F%2Flogin.windows-ppe.net%2Ff686d426-8d16-42db-81b7-ab578e110ccd%2Foauth2%2Fauthorize&api-version=1.0 + response: + body: + string: '{"tenant_discovery_endpoint":"https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd/.well-known/openid-configuration"}' + headers: + access-control-allow-methods: + - GET, OPTIONS + access-control-allow-origin: + - '*' + cache-control: + - max-age=86400, private + content-length: + - '131' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:33:57 GMT + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + set-cookie: + - fpc=Al3x0vN6soBLgLdZYlT2wYw; expires=Fri, 16-Jul-2021 18:33:58 GMT; path=/; + secure; HttpOnly; SameSite=None + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevruiQILcR_l77Wj1FFIY-FMZjZRaoyXdqCyglZrmjaIqbqSqfuTcoiKP-ojtUdwIELgU__q8AyMNOehp-8WIn_mX2OCeQKH2_lBkM13IWTKQYeRnbGh167mWjx9r8GxtxAdcvH4JkHuTsSdmyQI5OJa5ktd_jKgvji1rD1k5QxRGsgAA; + domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.11787.15 - WUS2 ProdSlices + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware global-reach-connection list + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.18.0 azsdk-python-mgmt-avs/0.1.0 Python/3.8.7 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://localhost:8866/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_hcx000001/providers/Microsoft.AVS/privateClouds/cloud1/globalReachConnections?api-version=2021-06-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 16 Jun 2021 18:34:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 1E82997E90B7412AA76545F261D77742 Ref B: LAXEDGE0810 Ref C: 2021-06-16T18:34:00Z' + status: + code: 200 + message: OK +version: 1 diff --git a/src/vmware/azext_vmware/tests/latest/test_addon_scenario.py b/src/vmware/azext_vmware/tests/latest/test_addon_scenario.py index 3c98b5ce987..cfda2e68734 100644 --- a/src/vmware/azext_vmware/tests/latest/test_addon_scenario.py +++ b/src/vmware/azext_vmware/tests/latest/test_addon_scenario.py @@ -47,19 +47,19 @@ def test_vmware_addon(self): count = len(self.cmd('vmware addon list -g {rg} -c {privatecloud}').get_output_in_json()) self.assertEqual(count, 0, 'addon count expected to be 0') - # # Create a SRM addon - # self.cmd('az vmware addon srm create -g {rg} -c {privatecloud} --license-key "41915178-A8FF-4A4D-B683-6D735AF5E3F5"') + # Create a SRM addon + self.cmd('az vmware addon srm create -g {rg} -c {privatecloud} --license-key "41915-178A8-FF4A4-DB683-6D735"') - # # List all existing addon - # count = len(self.cmd('vmware addon list -g {rg} -c {privatecloud}').get_output_in_json()) - # self.assertEqual(count, 1, 'addon count expected to be 1') + # List all existing addon + count = len(self.cmd('vmware addon list -g {rg} -c {privatecloud}').get_output_in_json()) + self.assertEqual(count, 1, 'addon count expected to be 1') - # # Show a SRM addon - # self.cmd('az vmware addon srm show -g {rg} -c {privatecloud}') + # Show a SRM addon + self.cmd('az vmware addon srm show -g {rg} -c {privatecloud}') - # # Delete a SRM addon - # self.cmd('az vmware addon srm delete -g {rg} -c {privatecloud}') + # Delete a SRM addon + self.cmd('az vmware addon srm delete -g {rg} -c {privatecloud}') - # # List all existing addon - # count = len(self.cmd('vmware addon list -g {rg} -c {privatecloud}').get_output_in_json()) - # self.assertEqual(count, 0, 'addon count expected to be 0') + # List all existing addon + count = len(self.cmd('vmware addon list -g {rg} -c {privatecloud}').get_output_in_json()) + self.assertEqual(count, 0, 'addon count expected to be 0') diff --git a/src/vmware/azext_vmware/tests/latest/test_global_reach_connection_scenario.py b/src/vmware/azext_vmware/tests/latest/test_global_reach_connection_scenario.py new file mode 100644 index 00000000000..35a29bc4e9e --- /dev/null +++ b/src/vmware/azext_vmware/tests/latest/test_global_reach_connection_scenario.py @@ -0,0 +1,48 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import os +import unittest + +from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer) + + +class VmwareGlobalReachConnectionScenarioTest(ScenarioTest): + def setUp(self): + # https://vcrpy.readthedocs.io/en/latest/configuration.html#request-matching + self.vcr.match_on = ['scheme', 'method', 'path', 'query'] # not 'host', 'port' + super(VmwareGlobalReachConnectionScenarioTest, self).setUp() + + @ResourceGroupPreparer(name_prefix='cli_test_vmware_hcx') + def test_vmware_global_reach_connection(self): + self.kwargs.update({ + 'loc': 'westcentralus', + 'privatecloud': 'cloud1', + 'global_reach_connection': 'connection1', + 'peer_express_route_circuit': '/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer', + 'authorization_key': '01010101-0101-0101-0101-010101010101' + }) + + self.cmd('az vmware private-cloud create -g {rg} -n {privatecloud} --location {loc} --sku av20 --cluster-size 4 --network-block 192.168.48.0/22 --nsxt-password 5rqdLj4GF3cePUe6( --vcenter-password UpfBXae9ZquZSDXk( --accept-eula') + + count = len(self.cmd('az vmware global-reach-connection list -g {rg} -c {privatecloud}').get_output_in_json()) + self.assertEqual(count, 0, 'count expected to be 0') + + rsp = self.cmd('az vmware global-reach-connection create -g {rg} -c {privatecloud} -n {global_reach_connection} --peer-express-route-circuit {peer_express_route_circuit} --authorization-key {authorization_key}').get_output_in_json() + self.assertEqual(rsp['type'], 'Microsoft.AVS/privateClouds/globalReachConnections') + self.assertEqual(rsp['name'], self.kwargs.get('global_reach_connection')) + + count = len(self.cmd('az vmware global-reach-connection list -g {rg} -c {privatecloud}').get_output_in_json()) + self.assertEqual(count, 1, 'count expected to be 1') + + self.cmd('vmware global-reach-connection show -g {rg} -c {privatecloud} -n {global_reach_connection}').get_output_in_json() + self.assertEqual(rsp['type'], 'Microsoft.AVS/privateClouds/globalReachConnections') + self.assertEqual(rsp['name'], self.kwargs.get('global_reach_connection')) + + rsp = self.cmd('vmware global-reach-connection delete -g {rg} -c {privatecloud} -n {global_reach_connection}').output + self.assertEqual(len(rsp), 0) + + count = len(self.cmd('az vmware global-reach-connection list -g {rg} -c {privatecloud}').get_output_in_json()) + self.assertEqual(count, 0, 'count expected to be 0') diff --git a/src/vmware/linter_exclusions.yml b/src/vmware/linter_exclusions.yml new file mode 100644 index 00000000000..60984f9fde5 --- /dev/null +++ b/src/vmware/linter_exclusions.yml @@ -0,0 +1,5 @@ +vmware global-reach-connection create: + parameters: + peer_express_route_circuit: + rule_exclusions: + - option_length_too_long diff --git a/src/vmware/setup.py b/src/vmware/setup.py index 9649cf71529..86253aa8a6d 100644 --- a/src/vmware/setup.py +++ b/src/vmware/setup.py @@ -8,7 +8,7 @@ from io import open from setuptools import setup, find_packages -VERSION = "2.0.1" +VERSION = "3.0.0" with open('README.md', encoding='utf-8') as f: readme = f.read() diff --git a/testing/Bootstrap.ps1 b/testing/Bootstrap.ps1 index c9123ba6d03..0598b139c79 100644 --- a/testing/Bootstrap.ps1 +++ b/testing/Bootstrap.ps1 @@ -18,15 +18,10 @@ if (-not (Test-Path -Path $PSScriptRoot/tmp)) { if (!$SkipInstall) { Write-Host "Removing the old connnectedk8s extension..." az extension remove -n connectedk8s - $connectedk8sVersion = $ENVCONFIG.extensionVersion.connectedk8s - if (!$connectedk8sVersion) { - Write-Host "connectedk8s extension version wasn't specified" -ForegroundColor Red - Exit 1 - } - Write-Host "Installing connectedk8s version $connectedk8sVersion..." - az extension add --source ./bin/connectedk8s-$connectedk8sVersion-py3-none-any.whl + Write-Host "Installing connectedk8s..." + az extension add -n connectedk8s if (!$?) { - Write-Host "Unable to find connectedk8s version $connectedk8sVersion, exiting..." + Write-Host "Unable to install connectedk8s, exiting..." exit 1 } } @@ -76,5 +71,10 @@ if ($?) Write-Host "Connecting the cluster to Arc with connectedk8s..." $Env:KUBECONFIG="$PSScriptRoot/tmp/KUBECONFIG" -$Env:HELMVALUESPATH="$PSScriptRoot/bin/connectedk8s-values.yaml" az connectedk8s connect -g $ENVCONFIG.resourceGroup -n $ENVCONFIG.arcClusterName +if (!$?) +{ + kubectl get pods -A + Exit 1 +} +Write-Host "Successfully onboarded the cluster to Azure" \ No newline at end of file diff --git a/testing/bin/connectedk8s-1.0.0-py3-none-any.whl b/testing/bin/connectedk8s-1.0.0-py3-none-any.whl deleted file mode 100644 index 08f34250036..00000000000 Binary files a/testing/bin/connectedk8s-1.0.0-py3-none-any.whl and /dev/null differ diff --git a/testing/bin/connectedk8s-values.yaml b/testing/bin/connectedk8s-values.yaml deleted file mode 100644 index 5d76bd4521b..00000000000 --- a/testing/bin/connectedk8s-values.yaml +++ /dev/null @@ -1,3 +0,0 @@ -systemDefaultValues: - extensionoperator: - enabled: true \ No newline at end of file diff --git a/testing/settings.template.json b/testing/settings.template.json index 04eda8e4dfa..5129dbd0a20 100644 --- a/testing/settings.template.json +++ b/testing/settings.template.json @@ -6,7 +6,6 @@ "extensionVersion": { "k8s-extension": "0.3.0", - "k8s-extension-private": "0.1.0", - "connectedk8s": "1.0.0" + "k8s-extension-private": "0.1.0" } } \ No newline at end of file